!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a,b){function c(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function d(){}function e(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=h.length;c>b;b++){var d=h[b];a[d]=0}return a}function f(b){function d(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||g("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=b("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var f=document.body||document.documentElement;f.appendChild(e);var h=j(e);l=200===c(h.width),f.removeChild(e)}}}function f(a){if(d(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var b=j(a);if("none"===b.display)return e();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var g=f.isBorderBox=!(!k||!b[k]||"border-box"!==b[k]),m=0,n=h.length;n>m;m++){var o=h[m],p=b[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=g&&l,y=c(b.width);y!==!1&&(f.width=y+(x?0:r+v));var z=c(b.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return f}var g="undefined"==typeof console?d:function(a){console.error(a)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],f):"object"==typeof exports?module.exports=f(require("desandro-get-style-property")):a.getSize=f(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){"use strict";function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"use strict";"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){"use strict";function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){"use strict";function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.Item=b(a.Outlayer))}(window,function(a){"use strict";function b(){a.Item.apply(this,arguments)}b.prototype=new a.Item,b.prototype._create=function(){this.id=this.layout.itemGUID++,a.Item.prototype._create.call(this),this.sortData={}},b.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var a=this.layout.options.getSortData,b=this.layout._sorters;for(var c in a){var d=b[c];this.sortData[c]=d(this.element,this)}}};var c=b.prototype.destroy;return b.prototype.destroy=function(){c.apply(this,arguments),this.css({display:""})},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("get-size"),require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.LayoutMode=b(a.getSize,a.Outlayer))}(window,function(a,b){"use strict";function c(a){this.isotope=a,a&&(this.options=a.options[this.namespace],this.element=a.element,this.items=a.filteredItems,this.size=a.size)}return function(){function a(a){return function(){return b.prototype[a].apply(this.isotope,arguments)}}for(var d=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],e=0,f=d.length;f>e;e++){var g=d[e];c.prototype[g]=a(g)}}(),c.prototype.needsVerticalResizeLayout=function(){var b=a(this.isotope.element),c=this.isotope.size&&b;return c&&b.innerHeight!=this.isotope.size.innerHeight},c.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},c.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},c.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},c.prototype.getSegmentSize=function(a,b){var c=a+b,d="outer"+b;if(this._getMeasurement(c,d),!this[c]){var e=this.getFirstItemSize();this[c]=e&&e[d]||this.isotope.size["inner"+b]}},c.prototype.getFirstItemSize=function(){var b=this.isotope.filteredItems[0];return b&&b.element&&a(b.element)},c.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},c.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},c.modes={},c.create=function(a,b){function d(){c.apply(this,arguments)}return d.prototype=new c,b&&(d.options=b),d.prototype.namespace=a,c.modes[a]=d,d},c}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],b):"object"==typeof exports?module.exports=b(require("../layout-mode"),require("masonry-layout")):b(a.Isotope.LayoutMode,a.Masonry)}(window,function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}var d=a.create("masonry"),e=d.prototype._getElementOffset,f=d.prototype.layout,g=d.prototype._getMeasurement; c(d.prototype,b.prototype),d.prototype._getElementOffset=e,d.prototype.layout=f,d.prototype._getMeasurement=g;var h=d.prototype.measureColumns;d.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,h.call(this)};var i=d.prototype._manageStamp;return d.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,i.apply(this,arguments)},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("fitRows");return b.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth+this.gutter,c=this.isotope.size.innerWidth+this.gutter;0!==this.x&&b+this.x>c&&(this.x=0,this.y=this.maxY);var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,d},b.prototype._getContainerSize=function(){return{height:this.maxY}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("vertical",{horizontalAlignment:0});return b.prototype._resetLayout=function(){this.y=0},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=(this.isotope.size.innerWidth-a.size.outerWidth)*this.options.horizontalAlignment,c=this.y;return this.y+=a.size.outerHeight,{x:b,y:c}},b.prototype._getContainerSize=function(){return{height:this.y}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(c,d,e,f,g,h){return b(a,c,d,e,f,g,h)}):"object"==typeof exports?module.exports=b(a,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):a.Isotope=b(a,a.Outlayer,a.getSize,a.matchesSelector,a.fizzyUIUtils,a.Isotope.Item,a.Isotope.LayoutMode)}(window,function(a,b,c,d,e,f,g){function h(a,b){return function(c,d){for(var e=0,f=a.length;f>e;e++){var g=a[e],h=c.sortData[g],i=d.sortData[g];if(h>i||i>h){var j=void 0!==b[g]?b[g]:b,k=j?1:-1;return(h>i?1:-1)*k}}return 0}}var i=a.jQuery,j=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")},k=document.documentElement,l=k.textContent?function(a){return a.textContent}:function(a){return a.innerText},m=b.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});m.Item=f,m.LayoutMode=g,m.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),b.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var a in g.modes)this._initLayoutMode(a)},m.prototype.reloadItems=function(){this.itemGUID=0,b.prototype.reloadItems.call(this)},m.prototype._itemize=function(){for(var a=b.prototype._itemize.apply(this,arguments),c=0,d=a.length;d>c;c++){var e=a[c];e.id=this.itemGUID++}return this._updateItemsSortData(a),a},m.prototype._initLayoutMode=function(a){var b=g.modes[a],c=this.options[a]||{};this.options[a]=b.options?e.extend(b.options,c):c,this.modes[a]=new b(this)},m.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},m.prototype._layout=function(){var a=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,a),this._isLayoutInited=!0},m.prototype.arrange=function(a){function b(){d.reveal(c.needReveal),d.hide(c.needHide)}this.option(a),this._getIsInstant();var c=this._filter(this.items);this.filteredItems=c.matches;var d=this;this._bindArrangeComplete(),this._isInstant?this._noTransition(b):b(),this._sort(),this._layout()},m.prototype._init=m.prototype.arrange,m.prototype._getIsInstant=function(){var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=a,a},m.prototype._bindArrangeComplete=function(){function a(){b&&c&&d&&e.dispatchEvent("arrangeComplete",null,[e.filteredItems])}var b,c,d,e=this;this.once("layoutComplete",function(){b=!0,a()}),this.once("hideComplete",function(){c=!0,a()}),this.once("revealComplete",function(){d=!0,a()})},m.prototype._filter=function(a){var b=this.options.filter;b=b||"*";for(var c=[],d=[],e=[],f=this._getFilterTest(b),g=0,h=a.length;h>g;g++){var i=a[g];if(!i.isIgnored){var j=f(i);j&&c.push(i),j&&i.isHidden?d.push(i):j||i.isHidden||e.push(i)}}return{matches:c,needReveal:d,needHide:e}},m.prototype._getFilterTest=function(a){return i&&this.options.isJQueryFiltering?function(b){return i(b.element).is(a)}:"function"==typeof a?function(b){return a(b.element)}:function(b){return d(b.element,a)}},m.prototype.updateSortData=function(a){var b;a?(a=e.makeArray(a),b=this.getItems(a)):b=this.items,this._getSorters(),this._updateItemsSortData(b)},m.prototype._getSorters=function(){var a=this.options.getSortData;for(var b in a){var c=a[b];this._sorters[b]=n(c)}},m.prototype._updateItemsSortData=function(a){for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.updateSortData()}};var n=function(){function a(a){if("string"!=typeof a)return a;var c=j(a).split(" "),d=c[0],e=d.match(/^\[(.+)\]$/),f=e&&e[1],g=b(f,d),h=m.sortDataParsers[c[1]];return a=h?function(a){return a&&h(g(a))}:function(a){return a&&g(a)}}function b(a,b){var c;return c=a?function(b){return b.getAttribute(a)}:function(a){var c=a.querySelector(b);return c&&l(c)}}return a}();m.sortDataParsers={parseInt:function(a){return parseInt(a,10)},parseFloat:function(a){return parseFloat(a)}},m.prototype._sort=function(){var a=this.options.sortBy;if(a){var b=[].concat.apply(a,this.sortHistory),c=h(b,this.options.sortAscending);this.filteredItems.sort(c),a!=this.sortHistory[0]&&this.sortHistory.unshift(a)}},m.prototype._mode=function(){var a=this.options.layoutMode,b=this.modes[a];if(!b)throw new Error("No layout mode: "+a);return b.options=this.options[a],b},m.prototype._resetLayout=function(){b.prototype._resetLayout.call(this),this._mode()._resetLayout()},m.prototype._getItemLayoutPosition=function(a){return this._mode()._getItemLayoutPosition(a)},m.prototype._manageStamp=function(a){this._mode()._manageStamp(a)},m.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},m.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},m.prototype.appended=function(a){var b=this.addItems(a);if(b.length){var c=this._filterRevealAdded(b);this.filteredItems=this.filteredItems.concat(c)}},m.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){this._resetLayout(),this._manageStamps();var c=this._filterRevealAdded(b);this.layoutItems(this.filteredItems),this.filteredItems=c.concat(this.filteredItems),this.items=b.concat(this.items)}},m.prototype._filterRevealAdded=function(a){var b=this._filter(a);return this.hide(b.needHide),this.reveal(b.matches),this.layoutItems(b.matches,!0),b.matches},m.prototype.insert=function(a){var b=this.addItems(a);if(b.length){var c,d,e=b.length;for(c=0;e>c;c++)d=b[c],this.element.appendChild(d.element);var f=this._filter(b).matches;for(c=0;e>c;c++)b[c].isLayoutInstant=!0;for(this.arrange(),c=0;e>c;c++)delete b[c].isLayoutInstant;this.reveal(f)}};var o=m.prototype.remove;return m.prototype.remove=function(a){a=e.makeArray(a);var b=this.getItems(a);o.call(this,a);var c=b&&b.length;if(c)for(var d=0;c>d;d++){var f=b[d];e.removeFrom(this.filteredItems,f)}},m.prototype.shuffle=function(){for(var a=0,b=this.items.length;b>a;a++){var c=this.items[a];c.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},m.prototype._noTransition=function(a){var b=this.options.transitionDuration;this.options.transitionDuration=0;var c=a.call(this);return this.options.transitionDuration=b,c},m.prototype.getFilteredItemElements=function(){for(var a=[],b=0,c=this.filteredItems.length;c>b;b++)a.push(this.filteredItems[b].element);return a},m}); (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t')},addLoading:function(b){a(b.loadingParentElement).append('
')},removeLoading:function(){var c=a(this),d=c.data(b).options,e=a(d.loadingParentElement).children("."+d.loadingClass);e.fadeOut().remove()},supportCheck:function(b){var c=a(this),d=b.unSupportCss,e=d.length,f=!1;0===e&&(f=!0);for(var g=0;e>g;g++)if("string"==typeof c.css(d[g])){f=!0;break}return f},optionCheck:function(b){var c,d=a(this);return c=b.overlay||d.data("animsition-overlay")?!0:!1},animationCheck:function(c,d,e){var f=a(this),g=f.data(b).options,h=typeof c,i=!d&&"number"===h,j=d&&"string"===h&&c.length>0;return i||j?c=c:d&&e?c=g.inClass:!d&&e?c=g.inDuration:d&&!e?c=g.outClass:d||e||(c=g.outDuration),c},pageIn:function(){var d=this,e=a(this),f=e.data(b).options,g=e.data("animsition-in-duration"),h=e.data("animsition-in"),i=c.animationCheck.call(d,g,!1,!0),j=c.animationCheck.call(d,h,!0,!0),k=c.optionCheck.call(d,f);f.loading&&c.removeLoading.call(d),k?c.pageInOverlay.call(d,j,i):c.pageInBasic.call(d,j,i)},pageInBasic:function(b,c){var d=a(this);d.css({"animation-duration":c/1e3+"s"}).addClass(b).animateCallback(function(){d.removeClass(b).css({opacity:1})})},pageInOverlay:function(c,d){var e=a(this),f=e.data(b).options;e.css({opacity:1}),a(f.overlayParentElement).children("."+f.overlayClass).css({"animation-duration":d/1e3+"s"}).addClass(c)},pageOut:function(d,e){var f=this,g=a(this),h=g.data(b).options,i=d.data("animsition-out"),j=g.data("animsition-out"),k=d.data("animsition-out-duration"),l=g.data("animsition-out-duration"),m=i?i:j,n=k?k:l,o=c.animationCheck.call(f,m,!0,!1),p=c.animationCheck.call(f,n,!1,!1),q=c.optionCheck.call(f,h);q?c.pageOutOverlay.call(f,o,p,e):c.pageOutBasic.call(f,o,p,e)},pageOutBasic:function(b,c,d){var e=a(this);e.css({"animation-duration":c/1e3+"s"}).addClass(b).animateCallback(function(){location.href=d})},pageOutOverlay:function(d,e,f){var g=this,h=a(this),i=h.data(b).options,j=h.data("animsition-in"),k=c.animationCheck.call(g,j,!0,!0);a(i.overlayParentElement).children("."+i.overlayClass).css({"animation-duration":e/1e3+"s"}).removeClass(k).addClass(d).animateCallback(function(){h.css({opacity:0}),location.href=f})},destroy:function(){return this.each(function(){var c=a(this);a(window).unbind("."+b),c.css({opacity:1}).removeData(b)})}};a.fn.animateCallback=function(b){var c="animationend webkitAnimationEnd mozAnimationEnd oAnimationEnd MSAnimationEnd";return this.each(function(){a(this).bind(c,function(){return a(this).unbind(c),b.call(this)})})},a.fn.animsition=function(d){return c[d]?c[d].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof d&&d?void a.error("Method "+d+" does not exist on jQuery."+b):c.init.apply(this,arguments)}}(jQuery); (function(c,k){"function"===typeof define&&define.amd?define(["jquery"],function(m){return k(m,c,c.document,c.Math)}):"undefined"!==typeof exports?module.exports=k(require("jquery"),c,c.document,c.Math):k(jQuery,c,c.document,c.Math)})("undefined"!==typeof window?window:this,function(c,k,m,p,D){var n=c(k),t=c(m);c.fn.fullpage=function(d){function La(){d.css3&&(d.css3=Ma());d.anchors.length||(d.anchors=c("[data-anchor]").map(function(){return c(this).data("anchor").toString()}).get());Na();e.setAllowScrolling(!0); q=n.height();e.setAutoScrolling(d.autoScrolling,"internal");var a=c(".fp-section.active").find(".fp-slide.active");a.length&&(0!==c(".fp-section.active").index(".fp-section")||0===c(".fp-section.active").index(".fp-section")&&0!==a.index())&&T(a);ja();ka();n.on("load",function(){var a=k.location.hash.replace("#","").split("/"),c=a[0],a=a[1];c&&(d.animateAnchor?U(c,a):e.silentMoveTo(c,a))})}function Na(){h.css({height:"100%",position:"relative"});h.addClass("fullpage-wrapper");c("html").addClass("fp-enabled"); h.removeClass("fp-destroyed");Oa();c(".fp-section").each(function(a){var b=c(this),g=b.find(".fp-slide"),f=g.length;a||0!==c(".fp-section.active").length||b.addClass("active");b.css("height",q+"px");d.paddingTop&&b.css("padding-top",d.paddingTop);d.paddingBottom&&b.css("padding-bottom",d.paddingBottom);"undefined"!==typeof d.sectionsColor[a]&&b.css("background-color",d.sectionsColor[a]);"undefined"!==typeof d.anchors[a]&&b.attr("data-anchor",d.anchors[a]);"undefined"!==typeof d.anchors[a]&&b.hasClass("active")&& V(d.anchors[a],a);d.menu&&d.css3&&c(d.menu).closest(".fullpage-wrapper").length&&c(d.menu).appendTo(r);0');b.parent().wrap('
');a.find(".fp-slidesContainer").css("width",f+"%");1
'); "#fff"!=d.controlArrowColor&&(a.find(".fp-controlArrow.fp-next").css("border-color","transparent transparent transparent "+d.controlArrowColor),a.find(".fp-controlArrow.fp-prev").css("border-color","transparent "+d.controlArrowColor+" transparent transparent"));d.loopHorizontal||a.find(".fp-controlArrow.fp-prev").hide()}function Qa(){r.append('
    ');var a=c("#fp-nav");a.addClass(function(){return d.showActiveTooltip?"fp-show-active "+d.navigationPosition:d.navigationPosition}); for(var b=0;b',f=d.navigationTooltips[b];"undefined"!==typeof f&&""!==f&&(g+='
    '+f+"
    ");g+="";a.find("ul").append(g)}c("#fp-nav").css("margin-top","-"+c("#fp-nav").height()/2+"px");c("#fp-nav").find("li").eq(c(".fp-section.active").index(".fp-section")).find("a").addClass("active")}function ma(){c(".fp-section").each(function(){var a= c(this).find(".fp-slide");a.length?a.each(function(){I(c(this))}):I(c(this))});na()}function na(){var a=c(".fp-section.active"),b=a.find("SLIDES_WRAPPER"),g=a.find(".fp-scrollable");b.length&&(g=b.find(".fp-slide.active"));g.mouseover();J(a);oa(a);c.isFunction(d.afterLoad)&&d.afterLoad.call(a,a.data("anchor"),a.index(".fp-section")+1);c.isFunction(d.afterRender)&&d.afterRender.call(h)}function pa(){var a;if(!d.autoScrolling||d.scrollBar){for(var b=n.scrollTop(),g=0,f=p.abs(b-m.querySelectorAll(".fp-section")[0].offsetTop), e=m.querySelectorAll(".fp-section"),h=0;h=b[0].scrollHeight:void 0,d)c();else return!0;else c()}}function Ta(a){var b=a.originalEvent;if(!ra(a.target)&&ba(b)){d.autoScrolling&&a.preventDefault();a=c(".fp-section.active");var g=qa(a);u&&!w&&(b=sa(b),E=b.y,L=b.x,a.find(".fp-slides").length&&p.abs(M-L)>p.abs(F-E)?p.abs(M-L)>n.width()/100*d.touchSensitivity&&(M>L?l.m.right&&e.moveSlideRight():l.m.left&&e.moveSlideLeft()):d.autoScrolling&& p.abs(F-E)>n.height()/100*d.touchSensitivity&&(F>E?K("down",g):E>F&&K("up",g)))}}function ra(a,b){b=b||0;var g=c(a).parent();return b=g&&e&&(0>f?K("down",a):K("up",a)));return!1}d.fitToSection&&x.stop()}function va(a){var b=c(".fp-section.active").find(".fp-slides"),g=b.find(".fp-slide").length;if(!(!b.length||w||2>g)){var g=b.find(".fp-slide.active"),f=null,f="prev"===a?g.prev(".fp-slide"):g.next(".fp-slide");if(!f.length){if(!d.loopHorizontal)return;f="prev"===a?g.siblings(":last"):g.siblings(":first")}w=!0;G(b,f)}}function wa(){c(".fp-slide.active").each(function(){T(c(this),"internal")})}function z(a,b,g){requestAnimFrame(function(){var f= a.position();if("undefined"!==typeof f){var e=a.hasClass("fp-auto-height")?f.top-q+a.height():f.top,f={element:a,callback:b,isMovementUp:g,dest:f,dtop:e,yMovement:X(a),anchorLink:a.data("anchor"),sectionIndex:a.index(".fp-section"),activeSlide:a.find(".fp-slide.active"),activeSection:c(".fp-section.active"),leavingSection:c(".fp-section.active").index(".fp-section")+1,localIsResizing:v};if(!(f.activeSection.is(a)&&!v||d.scrollBar&&n.scrollTop()===f.dtop&&!a.hasClass("fp-auto-height"))){if(f.activeSlide.length)var h= f.activeSlide.data("anchor"),k=f.activeSlide.index();d.autoScrolling&&d.continuousVertical&&"undefined"!==typeof f.isMovementUp&&(!f.isMovementUp&&"up"==f.yMovement||f.isMovementUp&&"down"==f.yMovement)&&(f.isMovementUp?c(".fp-section.active").before(f.activeSection.nextAll(".fp-section")):c(".fp-section.active").after(f.activeSection.prevAll(".fp-section").get().reverse()),H(c(".fp-section.active").position().top),wa(),f.wrapAroundElements=f.activeSection,f.dest=f.element.position(),f.dtop=f.dest.top, f.yMovement=X(f.element));if(c.isFunction(d.onLeave)&&!f.localIsResizing){if(!1===d.onLeave.call(f.activeSection,f.leavingSection,f.sectionIndex+1,f.yMovement))return;Va(f.activeSection)}a.addClass("active").siblings().removeClass("active");J(a);u=!1;Y(k,h,f.anchorLink,f.sectionIndex);Wa(f);y=f.anchorLink;V(f.anchorLink,f.sectionIndex)}}})}function Wa(a){if(d.css3&&d.autoScrolling&&!d.scrollBar)xa("translate3d(0px, -"+a.dtop+"px, 0px)",!0),d.scrollingSpeed?ca=setTimeout(function(){da(a)},d.scrollingSpeed): da(a);else{var b=Xa(a);c(b.element).animate(b.options,d.scrollingSpeed,d.easing).promise().done(function(){da(a)})}}function Xa(a){var b={};d.autoScrolling&&!d.scrollBar?(b.options={top:-a.dtop},b.element=".fullpage-wrapper"):(b.options={scrollTop:a.dtop},b.element="html, body");return b}function da(a){a.wrapAroundElements&&a.wrapAroundElements.length&&(a.isMovementUp?c(".fp-section:first").before(a.wrapAroundElements):c(".fp-section:last").after(a.wrapAroundElements),H(c(".fp-section.active").position().top), wa());a.element.find(".fp-scrollable").mouseover();c.isFunction(d.afterLoad)&&!a.localIsResizing&&d.afterLoad.call(a.element,a.anchorLink,a.sectionIndex+1);oa(a.element);u=!0;c.isFunction(a.callback)&&a.callback.call(this)}function J(a){var b=a.find(".fp-slide.active");b.length&&(a=c(b));a.find("img[data-src], source[data-src], audio[data-src]").each(function(){c(this).attr("src",c(this).data("src"));c(this).removeAttr("data-src");c(this).is("source")&&c(this).closest("video").get(0).load()})}function oa(a){a.find("video, audio").each(function(){var a= c(this).get(0);a.hasAttribute("autoplay")&&"function"===typeof a.play&&a.play()})}function Va(a){a.find("video, audio").each(function(){var a=c(this).get(0);a.hasAttribute("data-ignore")||"function"!==typeof a.pause||a.pause()})}function ya(){if(!W&&!d.lockAnchors){var a=k.location.hash.replace("#","").split("/"),b=a[0],a=a[1],c="undefined"===typeof y,f="undefined"===typeof y&&"undefined"===typeof a&&!w;b.length&&(b&&b!==y&&!c||f||!w&&ea!=a)&&U(b,a)}}function Ya(a){u&&(a.pageYO&&e.moveSectionDown());O=a.pageY}function G(a,b){var g=b.position(),f=b.index(),e=a.closest(".fp-section"),h=e.index(".fp-section"),k=e.data("anchor"),l=e.find(".fp-slidesNav"),m=fa(b),n=v;if(d.onSlideLeave){var q=e.find(".fp-slide.active"),r=q.index(),t;t=r==f?"none":r>f?"left":"right";if(!n&&"none"!==t&&c.isFunction(d.onSlideLeave)&&!1===d.onSlideLeave.call(q,k,h+1,r,t,f)){w=!1;return}}b.addClass("active").siblings().removeClass("active");n||J(b);!d.loopHorizontal&&d.controlArrows&&(e.find(".fp-controlArrow.fp-prev").toggle(0!==f),e.find(".fp-controlArrow.fp-next").toggle(!b.is(":last-child")));e.hasClass("active")&&Y(f,m,k,h);var u=function(){n||c.isFunction(d.afterSlideLoad)&&d.afterSlideLoad.call(b,k,h+1,m,f);w=!1};d.css3?(g="translate3d(-"+p.round(g.left)+"px, 0px, 0px)",za(a.find(".fp-slidesContainer"),020*p.max(ha,a)/100&&(e.reBuild(!0),ha=a))}else clearTimeout(ia),ia=setTimeout(function(){e.reBuild(!0)},350)}function ja(){var a=d.responsive||d.responsiveWidth,b=d.responsiveHeight,c=a&&n.width()a||900>b){var c=p.min(100*a/825,100*b/900).toFixed(2);r.css("font-size",c+"%")}else r.css("font-size","100%")}function V(a,b){d.menu&&(c(d.menu).find(".active").removeClass("active"),c(d.menu).find('[data-menuanchor="'+a+'"]').addClass("active"));d.navigation&&(c("#fp-nav").find(".active").removeClass("active"),a?c("#fp-nav").find('a[href="#'+a+'"]').addClass("active"):c("#fp-nav").find("li").eq(b).find("a").addClass("active"))} function X(a){var b=c(".fp-section.active").index(".fp-section");a=a.index(".fp-section");return b==a?"none":b>a?"up":"down"}function I(a){a.css("overflow","hidden");var b=a.closest(".fp-section"),c=a.find(".fp-scrollable"),f;c.length?f=c.get(0).scrollHeight:(f=a.get(0).scrollHeight,d.verticalCentered&&(f=a.find(".fp-tableCell").get(0).scrollHeight));b=q-parseInt(b.css("padding-bottom"))-parseInt(b.css("padding-top"));f>b?c.length?c.css("height",b+"px").parent().css("height",b+"px"):(d.verticalCentered? a.find(".fp-tableCell").wrapInner('
    '):a.wrapInner('
    '),a.find(".fp-scrollable").slimScroll({allowPageScroll:!0,height:b+"px",size:"10px",alwaysVisible:!0})):Ca(a);a.css("overflow","")}function Ca(a){a.find(".fp-scrollable").children().first().unwrap().unwrap();a.find(".slimScrollBar").remove();a.find(".slimScrollRail").remove()}function la(a){a.addClass("fp-table").wrapInner('
    ')}function Da(a){var b= q;if(d.paddingTop||d.paddingBottom)b=a,b.hasClass("fp-section")||(b=a.closest(".fp-section")),a=parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom")),b=q-a;return b}function xa(a,b){b?za(h):h.addClass("fp-notransition");h.css(Aa(a));setTimeout(function(){h.removeClass("fp-notransition")},10)}function Ea(a){var b=c('.fp-section[data-anchor="'+a+'"]');b.length||(b=c(".fp-section").eq(a-1));return b}function U(a,b){var c=Ea(a);"undefined"===typeof b&&(b=0);a===y||c.hasClass("active")?Fa(c, b):z(c,function(){Fa(c,b)})}function Fa(a,b){if("undefined"!==typeof b){var c=a.find(".fp-slides"),d;d=a.find(".fp-slides");var e=d.find('.fp-slide[data-anchor="'+b+'"]');e.length||(e=d.find(".fp-slide").eq(b));d=e;d.length&&G(c,d)}}function Sa(a,b){a.append('
      ');var c=a.find(".fp-slidesNav");c.addClass(d.slidesNavPosition);for(var f=0;f');c.css("margin-left","-"+c.width()/2+"px");c.find("li").first().find("a").addClass("active")} function Y(a,b,c,f){f="";d.anchors.length&&!d.lockAnchors&&(a?("undefined"!==typeof c&&(f=c),"undefined"===typeof b&&(b=a),ea=b,Ga(f+"/"+b)):("undefined"!==typeof a&&(ea=b),Ga(c)));ka()}function Ga(a){if(d.recordHistory)location.hash=a;else if(P||Q)history.replaceState(D,D,"#"+a);else{var b=k.location.href.split("#")[0];k.location.replace(b+"#"+a)}}function fa(a){var b=a.data("anchor");a=a.index();"undefined"===typeof b&&(b=a);return b}function ka(){var a=c(".fp-section.active"),b=a.find(".fp-slide.active"), d=fa(a),f=fa(b);a.index(".fp-section");a=String(d);b.length&&(a=a+"-"+f);a=a.replace("/","-").replace("#","");r[0].className=r[0].className.replace(RegExp("\\b\\s?fp-viewing-[^\\s]+\\b","g"),"");r.addClass("fp-viewing-"+a)}function Ma(){var a=m.createElement("p"),b,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};m.body.insertBefore(a,null);for(var d in c)a.style[d]!==D&&(a.style[d]="translate3d(1px,1px,1px)", b=k.getComputedStyle(a).getPropertyValue(c[d]));m.body.removeChild(a);return b!==D&&0(b/=e/2)?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c}});c.extend(c.easing,{easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c}});e.setAutoScrolling= function(a,b){R("autoScrolling",a,b);var g=c(".fp-section.active");d.autoScrolling&&!d.scrollBar?(x.css({overflow:"hidden",height:"100%"}),e.setRecordHistory(C.recordHistory,"internal"),h.css({"-ms-touch-action":"none","touch-action":"none"}),g.length&&H(g.position().top)):(x.css({overflow:"visible",height:"initial"}),e.setRecordHistory(!1,"internal"),h.css({"-ms-touch-action":"","touch-action":""}),H(0),g.length&&x.scrollTop(g.position().top))};e.setRecordHistory=function(a,b){R("recordHistory", a,b)};e.setScrollingSpeed=function(a,b){R("scrollingSpeed",a,b)};e.setFitToSection=function(a,b){R("fitToSection",a,b)};e.setLockAnchors=function(a){d.lockAnchors=a};e.setMouseWheelScrolling=function(a){if(a){a="";var b;k.addEventListener?b="addEventListener":(b="attachEvent",a="on");var c="onwheel"in m.createElement("div")?"wheel":m.onmousewheel!==D?"mousewheel":"DOMMouseScroll";if("DOMMouseScroll"==c)m[b](a+"MozMousePixelScroll",A,!1);else m[b](a+c,A,!1)}else m.addEventListener?(m.removeEventListener("mousewheel", A,!1),m.removeEventListener("wheel",A,!1),m.removeEventListener("MozMousePixelScroll",A,!1)):m.detachEvent("onmousewheel",A)};e.setAllowScrolling=function(a,b){"undefined"!==typeof b?(b=b.replace(/ /g,"").split(","),c.each(b,function(b,c){Ia(a,c,"m")})):a?(e.setMouseWheelScrolling(!0),$a()):(e.setMouseWheelScrolling(!1),ab())};e.setKeyboardScrolling=function(a,b){"undefined"!==typeof b?(b=b.replace(/ /g,"").split(","),c.each(b,function(b,c){Ia(a,c,"k")})):d.keyboardScrolling=a};e.moveSectionUp=function(){var a= c(".fp-section.active").prev(".fp-section");a.length||!d.loopTop&&!d.continuousVertical||(a=c(".fp-section").last());a.length&&z(a,null,!0)};e.moveSectionDown=function(){var a=c(".fp-section.active").next(".fp-section");a.length||!d.loopBottom&&!d.continuousVertical||(a=c(".fp-section").first());a.length&&z(a,null,!1)};e.silentMoveTo=function(a,b){requestAnimFrame(function(){e.setScrollingSpeed(0,"internal")});e.moveTo(a,b);requestAnimFrame(function(){e.setScrollingSpeed(C.scrollingSpeed,"internal")})}; e.moveTo=function(a,b){var c=Ea(a);"undefined"!==typeof b?U(a,b):0").attr("id", "royal_preloader").prependTo(JQ(document.body)));this._overlay.addClass("royal_preloader_"+this._mode);"line"!==this._mode&&this._overlay.css("background-color",this._background);switch(this._mode){case "number":var a=this._hexToRgb(this._text_colour);this._percentage=JQ("
      ").html("
      ").css({color:this._text_colour,"border-color":a?"rgba("+a.r+", "+a.g+", "+a.b+", 0.7)":this._text_colour}).addClass("royal_preloader_percentage").appendTo(this._overlay);this._percentage.children("div").css("border-left-color", this._text_colour);break;case "text":this._text_loader=JQ("
      ").addClass("royal_preloader_loader").text(this._text).css("color",this._text_colour).appendTo(this._overlay);this._text_loader_overlay=JQ("
      ").css("background-color",this._background).appendTo(this._text_loader);break;case "scale_text":for(var a="",c=0;c"+this._htmlentities(this._text.charAt(c))+"";this._text_loader=JQ("
      ").addClass("royal_preloader_loader").html(a).css("color",this._text_colour).appendTo(this._overlay); break;case "logo":this._logo_loader=JQ("
      ").css({width:this._logo_size[0],height:this._logo_size[1],"margin-left":this._logo_size[0]/2*-1,"margin-top":this._logo_size[1]/2*-1,"background-image":'url("'+this._logo+'")'}).addClass("royal_preloader_loader").appendTo(this._overlay);this._logo_loader_meter=JQ("
      ").css("background-color",this._background).appendTo(this._logo_loader);this._show_progress&&(this._percentage=JQ("
      ").css({color:this._text_colour,width:this._logo_size[0],height:this._logo_size[1], "margin-left":this._logo_size[0]/2*-1,"margin-top":this._logo_size[1]/2,"background-color":this._background}).addClass("royal_preloader_percentage").appendTo(this._overlay));break;case "line":this._line_loader=JQ("
      ").addClass("royal_preloader_loader").css("background-color",this._background).appendTo(this._overlay);JQ("
      ").addClass("royal_preloader_peg").css("box-shadow","0 0 10px "+this._background).appendTo(this._line_loader);JQ(document.body).css("visibility","visible");break;case "progress":this._progress_loader= JQ("
      ").addClass("royal_preloader_loader").appendTo(this._overlay),this._progress_loader_meter=JQ("
      ").addClass("royal_preloader_meter").appendTo(this._progress_loader),this._show_progress&&(this._percentage=JQ("
      ").addClass("royal_preloader_percentage").text(0).appendTo(this._overlay))}this._overlay.appendTo(JQ(document.body));"text"!==this._mode&&"scale_text"!==this._mode||this._text_loader.css("margin-left",this._text_loader.width()/2*-1)},_load:function(){if(("number"===this._mode|| "logo"===this._mode||"progress"===this._mode)&&this._show_progress){this._percentage.data("num",0);var a="0"+(Royal_Preloader._show_percentage?"%":"");"number"===this._mode?this._percentage.children("span").text(a):this._percentage.text(a)}JQ.each(this._images,function(a,b){var d=function(){Royal_Preloader._imageOnLoad(b)},e=new Image;e.src=b;e.complete?d():(e.onload=d,e.onerror=d)});setTimeout(function(){Royal_Preloader._overlay&&Royal_Preloader._animatePercentage(Royal_Preloader._percentage_loaded, 100)},this._images.length?1E3*this._timeout:0)},_hexToRgb:function(a){return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null},_htmlentities:function(a){return a.toString().replace(/&/g,"&").replace(/\"/g,""").replace(//g,">").replace(/ /g," ")},_animatePercentage:function(a,c){Royal_Preloader._percentage_loaded=a;a
      ',image:'',iframe:'",error:'

      The requested content cannot be loaded.
      Please try again later.

      ',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k, c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&& k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current|| b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d= a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")), b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
      ').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(), y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement; if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1, mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio= !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href"); "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload= this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href); f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload, e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin, outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
      ").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
      ').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}", g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll": "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside? h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth|| h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),cz||y>r)&&(c>m&&j>u)&&!(19n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&jz||y>r)&&c>m&&j>u;c=h.aspectRatio?cu&&j
      ').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive? b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth), p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d= b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('
      '+e+"
      ");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d, e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+ ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('
      ').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('
      ').appendTo("body");var e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery); ;(function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else if(typeof exports==='object'){ factory(require('jquery')); }else{ factory(window.jQuery||window.Zepto); }}(function($){ var CLOSE_EVENT='Close', BEFORE_CLOSE_EVENT='BeforeClose', AFTER_CLOSE_EVENT='AfterClose', BEFORE_APPEND_EVENT='BeforeAppend', MARKUP_PARSE_EVENT='MarkupParse', OPEN_EVENT='Open', CHANGE_EVENT='Change', NS='mfp', EVENT_NS='.' + NS, READY_CLASS='mfp-ready', REMOVING_CLASS='mfp-removing', PREVENT_CLOSE_CLASS='mfp-prevent-close'; var mfp, MagnificPopup=function(){}, _isJQ = !!(window.jQuery), _prevStatus, _window=$(window), _document, _prevContentType, _wrapClasses, _currPopupType; var _mfpOn=function(name, f){ mfp.ev.on(NS + name + EVENT_NS, f); }, _getEl=function(className, appendTo, html, raw){ var el=document.createElement('div'); el.className='mfp-'+className; if(html){ el.innerHTML=html; } if(!raw){ el=$(el); if(appendTo){ el.appendTo(appendTo); }}else if(appendTo){ appendTo.appendChild(el); } return el; }, _mfpTrigger=function(e, data){ mfp.ev.triggerHandler(NS + e, data); if(mfp.st.callbacks){ e=e.charAt(0).toLowerCase() + e.slice(1); if(mfp.st.callbacks[e]){ mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data:[data]); }} }, _getCloseBtn=function(type){ if(type!==_currPopupType||!mfp.currTemplate.closeBtn){ mfp.currTemplate.closeBtn=$(mfp.st.closeMarkup.replace('%title%', mfp.st.tClose)); _currPopupType=type; } return mfp.currTemplate.closeBtn; }, _checkInstance=function(){ if(!$.magnificPopup.instance){ mfp=new MagnificPopup(); mfp.init(); $.magnificPopup.instance=mfp; }}, supportsTransitions=function(){ var s=document.createElement('p').style, // 's' for style. better to create an element if body yet to exist v=['ms','O','Moz','Webkit']; // 'v' for vendor if(s['transition']!==undefined){ return true; } while(v.length){ if(v.pop() + 'Transition' in s){ return true; }} return false; }; MagnificPopup.prototype={ constructor: MagnificPopup, init: function(){ var appVersion=navigator.appVersion; mfp.isLowIE=mfp.isIE8=document.all&&!document.addEventListener; mfp.isAndroid=(/android/gi).test(appVersion); mfp.isIOS=(/iphone|ipad|ipod/gi).test(appVersion); mfp.supportsTransition=supportsTransitions(); mfp.probablyMobile=(mfp.isAndroid||mfp.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent)); _document=$(document); mfp.popupsCache={};}, open: function(data){ var i; if(data.isObj===false){ mfp.items=data.items.toArray(); mfp.index=0; var items=data.items, item; for(i=0; i < items.length; i++){ item=items[i]; if(item.parsed){ item=item.el[0]; } if(item===data.el[0]){ mfp.index=i; break; }} }else{ mfp.items=$.isArray(data.items) ? data.items:[data.items]; mfp.index=data.index||0; } if(mfp.isOpen){ mfp.updateItemHTML(); return; } mfp.types=[]; _wrapClasses=''; if(data.mainEl&&data.mainEl.length){ mfp.ev=data.mainEl.eq(0); }else{ mfp.ev=_document; } if(data.key){ if(!mfp.popupsCache[data.key]){ mfp.popupsCache[data.key]={};} mfp.currTemplate=mfp.popupsCache[data.key]; }else{ mfp.currTemplate={};} mfp.st=$.extend(true, {}, $.magnificPopup.defaults, data); mfp.fixedContentPos=mfp.st.fixedContentPos==='auto' ? !mfp.probablyMobile:mfp.st.fixedContentPos; if(mfp.st.modal){ mfp.st.closeOnContentClick=false; mfp.st.closeOnBgClick=false; mfp.st.showCloseBtn=false; mfp.st.enableEscapeKey=false; } if(!mfp.bgOverlay){ mfp.bgOverlay=_getEl('bg').on('click'+EVENT_NS, function(){ mfp.close(); }); mfp.wrap=_getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e){ if(mfp._checkIfClose(e.target)){ mfp.close(); }}); mfp.container=_getEl('container', mfp.wrap); } mfp.contentContainer=_getEl('content'); if(mfp.st.preloader){ mfp.preloader=_getEl('preloader', mfp.container, mfp.st.tLoading); } var modules=$.magnificPopup.modules; for(i=0; i < modules.length; i++){ var n=modules[i]; n=n.charAt(0).toUpperCase() + n.slice(1); mfp['init'+n].call(mfp); } _mfpTrigger('BeforeOpen'); if(mfp.st.showCloseBtn){ if(!mfp.st.closeBtnInside){ mfp.wrap.append(_getCloseBtn()); }else{ _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item){ values.close_replaceWith=_getCloseBtn(item.type); }); _wrapClasses +=' mfp-close-btn-in'; }} if(mfp.st.alignTop){ _wrapClasses +=' mfp-align-top'; } if(mfp.fixedContentPos){ mfp.wrap.css({ overflow: mfp.st.overflowY, overflowX: 'hidden', overflowY: mfp.st.overflowY }); }else{ mfp.wrap.css({ top: _window.scrollTop(), position: 'absolute' }); } if(mfp.st.fixedBgPos===false||(mfp.st.fixedBgPos==='auto'&&!mfp.fixedContentPos)){ mfp.bgOverlay.css({ height: _document.height(), position: 'absolute' }); } if(mfp.st.enableEscapeKey){ _document.on('keyup' + EVENT_NS, function(e){ if(e.keyCode===27){ mfp.close(); }}); } _window.on('resize' + EVENT_NS, function(){ mfp.updateSize(); }); if(!mfp.st.closeOnContentClick){ _wrapClasses +=' mfp-auto-cursor'; } if(_wrapClasses) mfp.wrap.addClass(_wrapClasses); var windowHeight=mfp.wH=_window.height(); var windowStyles={}; if(mfp.fixedContentPos){ if(mfp._hasScrollBar(windowHeight)){ var s=mfp._getScrollbarSize(); if(s){ windowStyles.marginRight=s; }} } if(mfp.fixedContentPos){ if(!mfp.isIE7){ windowStyles.overflow='hidden'; }else{ $('body, html').css('overflow', 'hidden'); }} var classesToadd=mfp.st.mainClass; if(mfp.isIE7){ classesToadd +=' mfp-ie7'; } if(classesToadd){ mfp._addClassToMFP(classesToadd); } mfp.updateItemHTML(); _mfpTrigger('BuildControls'); $('html').css(windowStyles); mfp.bgOverlay.add(mfp.wrap).prependTo(mfp.st.prependTo||$(document.body)); mfp._lastFocusedEl=document.activeElement; setTimeout(function(){ if(mfp.content){ mfp._addClassToMFP(READY_CLASS); mfp._setFocus(); }else{ mfp.bgOverlay.addClass(READY_CLASS); } _document.on('focusin' + EVENT_NS, mfp._onFocusIn); }, 16); mfp.isOpen=true; mfp.updateSize(windowHeight); _mfpTrigger(OPEN_EVENT); return data; }, close: function(){ if(!mfp.isOpen) return; _mfpTrigger(BEFORE_CLOSE_EVENT); mfp.isOpen=false; if(mfp.st.removalDelay&&!mfp.isLowIE&&mfp.supportsTransition){ mfp._addClassToMFP(REMOVING_CLASS); setTimeout(function(){ mfp._close(); }, mfp.st.removalDelay); }else{ mfp._close(); }}, _close: function(){ _mfpTrigger(CLOSE_EVENT); var classesToRemove=REMOVING_CLASS + ' ' + READY_CLASS + ' '; mfp.bgOverlay.detach(); mfp.wrap.detach(); mfp.container.empty(); if(mfp.st.mainClass){ classesToRemove +=mfp.st.mainClass + ' '; } mfp._removeClassFromMFP(classesToRemove); if(mfp.fixedContentPos){ var windowStyles={marginRight: ''}; if(mfp.isIE7){ $('body, html').css('overflow', ''); }else{ windowStyles.overflow=''; } $('html').css(windowStyles); } _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS); mfp.ev.off(EVENT_NS); mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style'); mfp.bgOverlay.attr('class', 'mfp-bg'); mfp.container.attr('class', 'mfp-container'); if(mfp.st.showCloseBtn && (!mfp.st.closeBtnInside||mfp.currTemplate[mfp.currItem.type]===true)){ if(mfp.currTemplate.closeBtn) mfp.currTemplate.closeBtn.detach(); } if(mfp.st.autoFocusLast&&mfp._lastFocusedEl){ $(mfp._lastFocusedEl).focus(); } mfp.currItem=null; mfp.content=null; mfp.currTemplate=null; mfp.prevHeight=0; _mfpTrigger(AFTER_CLOSE_EVENT); }, updateSize: function(winHeight){ if(mfp.isIOS){ var zoomLevel=document.documentElement.clientWidth / window.innerWidth; var height=window.innerHeight * zoomLevel; mfp.wrap.css('height', height); mfp.wH=height; }else{ mfp.wH=winHeight||_window.height(); } if(!mfp.fixedContentPos){ mfp.wrap.css('height', mfp.wH); } _mfpTrigger('Resize'); }, updateItemHTML: function(){ var item=mfp.items[mfp.index]; mfp.contentContainer.detach(); if(mfp.content) mfp.content.detach(); if(!item.parsed){ item=mfp.parseEl(mfp.index); } var type=item.type; _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type:'', type]); mfp.currItem=item; if(!mfp.currTemplate[type]){ var markup=mfp.st[type] ? mfp.st[type].markup:false; _mfpTrigger('FirstMarkupParse', markup); if(markup){ mfp.currTemplate[type]=$(markup); }else{ mfp.currTemplate[type]=true; }} if(_prevContentType&&_prevContentType!==item.type){ mfp.container.removeClass('mfp-'+_prevContentType+'-holder'); } var newContent=mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]); mfp.appendContent(newContent, type); item.preloaded=true; _mfpTrigger(CHANGE_EVENT, item); _prevContentType=item.type; mfp.container.prepend(mfp.contentContainer); _mfpTrigger('AfterChange'); }, appendContent: function(newContent, type){ mfp.content=newContent; if(newContent){ if(mfp.st.showCloseBtn&&mfp.st.closeBtnInside && mfp.currTemplate[type]===true){ if(!mfp.content.find('.mfp-close').length){ mfp.content.append(_getCloseBtn()); }}else{ mfp.content=newContent; }}else{ mfp.content=''; } _mfpTrigger(BEFORE_APPEND_EVENT); mfp.container.addClass('mfp-'+type+'-holder'); mfp.contentContainer.append(mfp.content); }, parseEl: function(index){ var item=mfp.items[index], type; if(item.tagName){ item={ el: $(item) };}else{ type=item.type; item={ data: item, src: item.src };} if(item.el){ var types=mfp.types; for(var i=0; i < types.length; i++){ if(item.el.hasClass('mfp-'+types[i])){ type=types[i]; break; }} item.src=item.el.attr('data-mfp-src'); if(!item.src){ item.src=item.el.attr('href'); }} item.type=type||mfp.st.type||'inline'; item.index=index; item.parsed=true; mfp.items[index]=item; _mfpTrigger('ElementParse', item); return mfp.items[index]; }, addGroup: function(el, options){ var eHandler=function(e){ e.mfpEl=this; mfp._openClick(e, el, options); }; if(!options){ options={};} var eName='click.magnificPopup'; options.mainEl=el; if(options.items){ options.isObj=true; el.off(eName).on(eName, eHandler); }else{ options.isObj=false; if(options.delegate){ el.off(eName).on(eName, options.delegate , eHandler); }else{ options.items=el; el.off(eName).on(eName, eHandler); }} }, _openClick: function(e, el, options){ var midClick=options.midClick!==undefined ? options.midClick:$.magnificPopup.defaults.midClick; if(!midClick&&(e.which===2||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){ return; } var disableOn=options.disableOn!==undefined ? options.disableOn:$.magnificPopup.defaults.disableOn; if(disableOn){ if($.isFunction(disableOn)){ if(!disableOn.call(mfp)){ return true; }}else{ if(_window.width() < disableOn){ return true; }} } if(e.type){ e.preventDefault(); if(mfp.isOpen){ e.stopPropagation(); }} options.el=$(e.mfpEl); if(options.delegate){ options.items=el.find(options.delegate); } mfp.open(options); }, updateStatus: function(status, text){ if(mfp.preloader){ if(_prevStatus!==status){ mfp.container.removeClass('mfp-s-'+_prevStatus); } if(!text&&status==='loading'){ text=mfp.st.tLoading; } var data={ status: status, text: text }; _mfpTrigger('UpdateStatus', data); status=data.status; text=data.text; mfp.preloader.html(text); mfp.preloader.find('a').on('click', function(e){ e.stopImmediatePropagation(); }); mfp.container.addClass('mfp-s-'+status); _prevStatus=status; }}, _checkIfClose: function(target){ if($(target).hasClass(PREVENT_CLOSE_CLASS)){ return; } var closeOnContent=mfp.st.closeOnContentClick; var closeOnBg=mfp.st.closeOnBgClick; if(closeOnContent&&closeOnBg){ return true; }else{ if(!mfp.content||$(target).hasClass('mfp-close')||(mfp.preloader&&target===mfp.preloader[0])){ return true; } if((target!==mfp.content[0]&&!$.contains(mfp.content[0], target))){ if(closeOnBg){ if($.contains(document, target)){ return true; }} }else if(closeOnContent){ return true; }} return false; }, _addClassToMFP: function(cName){ mfp.bgOverlay.addClass(cName); mfp.wrap.addClass(cName); }, _removeClassFromMFP: function(cName){ this.bgOverlay.removeClass(cName); mfp.wrap.removeClass(cName); }, _hasScrollBar: function(winHeight){ return((mfp.isIE7 ? _document.height():document.body.scrollHeight) > (winHeight||_window.height())); }, _setFocus: function(){ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus(); }, _onFocusIn: function(e){ if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0], e.target)){ mfp._setFocus(); return false; }}, _parseMarkup: function(template, values, item){ var arr; if(item.data){ values=$.extend(item.data, values); } _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item]); $.each(values, function(key, value){ if(value===undefined||value===false){ return true; } arr=key.split('_'); if(arr.length > 1){ var el=template.find(EVENT_NS + '-'+arr[0]); if(el.length > 0){ var attr=arr[1]; if(attr==='replaceWith'){ if(el[0]!==value[0]){ el.replaceWith(value); }}else if(attr==='img'){ if(el.is('img')){ el.attr('src', value); }else{ el.replaceWith($('').attr('src', value).attr('class', el.attr('class'))); }}else{ el.attr(arr[1], value); }} }else{ template.find(EVENT_NS + '-'+key).html(value); }}); }, _getScrollbarSize: function(){ if(mfp.scrollbarSize===undefined){ var scrollDiv=document.createElement("div"); scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; document.body.appendChild(scrollDiv); mfp.scrollbarSize=scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); } return mfp.scrollbarSize; }}; $.magnificPopup={ instance: null, proto: MagnificPopup.prototype, modules: [], open: function(options, index){ _checkInstance(); if(!options){ options={};}else{ options=$.extend(true, {}, options); } options.isObj=true; options.index=index||0; return this.instance.open(options); }, close: function(){ return $.magnificPopup.instance&&$.magnificPopup.instance.close(); }, registerModule: function(name, module){ if(module.options){ $.magnificPopup.defaults[name]=module.options; } $.extend(this.proto, module.proto); this.modules.push(name); }, defaults: { disableOn: 0, key: null, midClick: false, mainClass: '', preloader: true, focus: '', closeOnContentClick: false, closeOnBgClick: true, closeBtnInside: true, showCloseBtn: true, enableEscapeKey: true, modal: false, alignTop: false, removalDelay: 0, prependTo: null, fixedContentPos: 'auto', fixedBgPos: 'auto', overflowY: 'auto', closeMarkup: '', tClose: 'Close (Esc)', tLoading: 'Loading...', autoFocusLast: true }}; $.fn.magnificPopup=function(options){ _checkInstance(); var jqEl=$(this); if(typeof options==="string"){ if(options==='open'){ var items, itemOpts=_isJQ ? jqEl.data('magnificPopup'):jqEl[0].magnificPopup, index=parseInt(arguments[1], 10)||0; if(itemOpts.items){ items=itemOpts.items[index]; }else{ items=jqEl; if(itemOpts.delegate){ items=items.find(itemOpts.delegate); } items=items.eq(index); } mfp._openClick({mfpEl:items}, jqEl, itemOpts); }else{ if(mfp.isOpen) mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); }}else{ options=$.extend(true, {}, options); if(_isJQ){ jqEl.data('magnificPopup', options); }else{ jqEl[0].magnificPopup=options; } mfp.addGroup(jqEl, options); } return jqEl; }; var INLINE_NS='inline', _hiddenClass, _inlinePlaceholder, _lastInlineElement, _putInlineElementsBack=function(){ if(_lastInlineElement){ _inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach(); _lastInlineElement=null; }}; $.magnificPopup.registerModule(INLINE_NS, { options: { hiddenClass: 'hide', markup: '', tNotFound: 'Content not found' }, proto: { initInline: function(){ mfp.types.push(INLINE_NS); _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function(){ _putInlineElementsBack(); }); }, getInline: function(item, template){ _putInlineElementsBack(); if(item.src){ var inlineSt=mfp.st.inline, el=$(item.src); if(el.length){ var parent=el[0].parentNode; if(parent&&parent.tagName){ if(!_inlinePlaceholder){ _hiddenClass=inlineSt.hiddenClass; _inlinePlaceholder=_getEl(_hiddenClass); _hiddenClass='mfp-'+_hiddenClass; } _lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); } mfp.updateStatus('ready'); }else{ mfp.updateStatus('error', inlineSt.tNotFound); el=$('
      '); } item.inlineElement=el; return el; } mfp.updateStatus('ready'); mfp._parseMarkup(template, {}, item); return template; }} }); var AJAX_NS='ajax', _ajaxCur, _removeAjaxCursor=function(){ if(_ajaxCur){ $(document.body).removeClass(_ajaxCur); }}, _destroyAjaxRequest=function(){ _removeAjaxCursor(); if(mfp.req){ mfp.req.abort(); }}; $.magnificPopup.registerModule(AJAX_NS, { options: { settings: null, cursor: 'mfp-ajax-cur', tError: 'The content could not be loaded.' }, proto: { initAjax: function(){ mfp.types.push(AJAX_NS); _ajaxCur=mfp.st.ajax.cursor; _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); }, getAjax: function(item){ if(_ajaxCur){ $(document.body).addClass(_ajaxCur); } mfp.updateStatus('loading'); var opts=$.extend({ url: item.src, success: function(data, textStatus, jqXHR){ var temp={ data:data, xhr:jqXHR }; _mfpTrigger('ParseAjax', temp); mfp.appendContent($(temp.data), AJAX_NS); item.finished=true; _removeAjaxCursor(); mfp._setFocus(); setTimeout(function(){ mfp.wrap.addClass(READY_CLASS); }, 16); mfp.updateStatus('ready'); _mfpTrigger('AjaxContentAdded'); }, error: function(){ _removeAjaxCursor(); item.finished=item.loadError=true; mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); }}, mfp.st.ajax.settings); mfp.req=$.ajax(opts); return ''; }} }); var _imgInterval, _getTitle=function(item){ if(item.data&&item.data.title!==undefined) return item.data.title; var src=mfp.st.image.titleSrc; if(src){ if($.isFunction(src)){ return src.call(mfp, item); }else if(item.el){ return item.el.attr(src)||''; }} return ''; }; $.magnificPopup.registerModule('image', { options: { markup: '
      '+ '
      '+ '
      '+ '
      '+ '
      '+ '
      '+ '
      '+ '
      '+ '
      '+ '
      '+ '
      '+ '
      ', cursor: 'mfp-zoom-out-cur', titleSrc: 'title', verticalFit: true, tError: 'The image could not be loaded.' }, proto: { initImage: function(){ var imgSt=mfp.st.image, ns='.image'; mfp.types.push('image'); _mfpOn(OPEN_EVENT+ns, function(){ if(mfp.currItem.type==='image'&&imgSt.cursor){ $(document.body).addClass(imgSt.cursor); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(imgSt.cursor){ $(document.body).removeClass(imgSt.cursor); } _window.off('resize' + EVENT_NS); }); _mfpOn('Resize'+ns, mfp.resizeImage); if(mfp.isLowIE){ _mfpOn('AfterChange', mfp.resizeImage); }}, resizeImage: function(){ var item=mfp.currItem; if(!item||!item.img) return; if(mfp.st.image.verticalFit){ var decr=0; if(mfp.isLowIE){ decr=parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); } item.img.css('max-height', mfp.wH-decr); }}, _onImageHasSize: function(item){ if(item.img){ item.hasSize=true; if(_imgInterval){ clearInterval(_imgInterval); } item.isCheckingImgSize=false; _mfpTrigger('ImageHasSize', item); if(item.imgHidden){ if(mfp.content) mfp.content.removeClass('mfp-loading'); item.imgHidden=false; }} }, findImageSize: function(item){ var counter=0, img=item.img[0], mfpSetInterval=function(delay){ if(_imgInterval){ clearInterval(_imgInterval); } _imgInterval=setInterval(function(){ if(img.naturalWidth > 0){ mfp._onImageHasSize(item); return; } if(counter > 200){ clearInterval(_imgInterval); } counter++; if(counter===3){ mfpSetInterval(10); }else if(counter===40){ mfpSetInterval(50); }else if(counter===100){ mfpSetInterval(500); }}, delay); }; mfpSetInterval(1); }, getImage: function(item, template){ var guard=0, onLoadComplete=function(){ if(item){ if(item.img[0].complete){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('ready'); } item.hasSize=true; item.loaded=true; _mfpTrigger('ImageLoadComplete'); }else{ guard++; if(guard < 200){ setTimeout(onLoadComplete,100); }else{ onLoadError(); }} }}, onLoadError=function(){ if(item){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); } item.hasSize=true; item.loaded=true; item.loadError=true; }}, imgSt=mfp.st.image; var el=template.find('.mfp-img'); if(el.length){ var img=document.createElement('img'); img.className='mfp-img'; if(item.el&&item.el.find('img').length){ img.alt=item.el.find('img').attr('alt'); } item.img=$(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); img.src=item.src; if(el.is('img')){ item.img=item.img.clone(); } img=item.img[0]; if(img.naturalWidth > 0){ item.hasSize=true; }else if(!img.width){ item.hasSize=false; }} mfp._parseMarkup(template, { title: _getTitle(item), img_replaceWith: item.img }, item); mfp.resizeImage(); if(item.hasSize){ if(_imgInterval) clearInterval(_imgInterval); if(item.loadError){ template.addClass('mfp-loading'); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); }else{ template.removeClass('mfp-loading'); mfp.updateStatus('ready'); } return template; } mfp.updateStatus('loading'); item.loading=true; if(!item.hasSize){ item.imgHidden=true; template.addClass('mfp-loading'); mfp.findImageSize(item); } return template; }} }); var hasMozTransform, getHasMozTransform=function(){ if(hasMozTransform===undefined){ hasMozTransform=document.createElement('p').style.MozTransform!==undefined; } return hasMozTransform; }; $.magnificPopup.registerModule('zoom', { options: { enabled: false, easing: 'ease-in-out', duration: 300, opener: function(element){ return element.is('img') ? element:element.find('img'); }}, proto: { initZoom: function(){ var zoomSt=mfp.st.zoom, ns='.zoom', image; if(!zoomSt.enabled||!mfp.supportsTransition){ return; } var duration=zoomSt.duration, getElToAnimate=function(image){ var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), transition='all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, cssObj={ position: 'fixed', zIndex: 9999, left: 0, top: 0, '-webkit-backface-visibility': 'hidden' }, t='transition'; cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition; newImg.css(cssObj); return newImg; }, showMainContent=function(){ mfp.content.css('visibility', 'visible'); }, openTimeout, animatedImg; _mfpOn('BuildControls'+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.content.css('visibility', 'hidden'); image=mfp._getItemToZoom(); if(!image){ showMainContent(); return; } animatedImg=getElToAnimate(image); animatedImg.css(mfp._getOffset()); mfp.wrap.append(animatedImg); openTimeout=setTimeout(function(){ animatedImg.css(mfp._getOffset(true)); openTimeout=setTimeout(function(){ showMainContent(); setTimeout(function(){ animatedImg.remove(); image=animatedImg=null; _mfpTrigger('ZoomAnimationEnded'); }, 16); }, duration); }, 16); }}); _mfpOn(BEFORE_CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.st.removalDelay=duration; if(!image){ image=mfp._getItemToZoom(); if(!image){ return; } animatedImg=getElToAnimate(image); } animatedImg.css(mfp._getOffset(true)); mfp.wrap.append(animatedImg); mfp.content.css('visibility', 'hidden'); setTimeout(function(){ animatedImg.css(mfp._getOffset()); }, 16); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ showMainContent(); if(animatedImg){ animatedImg.remove(); } image=null; }}); }, _allowZoom: function(){ return mfp.currItem.type==='image'; }, _getItemToZoom: function(){ if(mfp.currItem.hasSize){ return mfp.currItem.img; }else{ return false; }}, _getOffset: function(isLarge){ var el; if(isLarge){ el=mfp.currItem.img; }else{ el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem); } var offset=el.offset(); var paddingTop=parseInt(el.css('padding-top'),10); var paddingBottom=parseInt(el.css('padding-bottom'),10); offset.top -=($(window).scrollTop() - paddingTop); var obj={ width: el.width(), height: (_isJQ ? el.innerHeight():el[0].offsetHeight) - paddingBottom - paddingTop }; if(getHasMozTransform()){ obj['-moz-transform']=obj['transform']='translate(' + offset.left + 'px,' + offset.top + 'px)'; }else{ obj.left=offset.left; obj.top=offset.top; } return obj; }} }); var IFRAME_NS='iframe', _emptyPage='//about:blank', _fixIframeBugs=function(isShowing){ if(mfp.currTemplate[IFRAME_NS]){ var el=mfp.currTemplate[IFRAME_NS].find('iframe'); if(el.length){ if(!isShowing){ el[0].src=_emptyPage; } if(mfp.isIE8){ el.css('display', isShowing ? 'block':'none'); }} }}; $.magnificPopup.registerModule(IFRAME_NS, { options: { markup: '
      '+ '
      '+ ''+ '
      ', srcAction: 'iframe_src', patterns: { youtube: { index: 'youtube.com', id: 'v=', src: '//www.youtube.com/embed/%id%?autoplay=1' }, vimeo: { index: 'vimeo.com/', id: '/', src: '//player.vimeo.com/video/%id%?autoplay=1' }, gmaps: { index: '//maps.google.', src: '%id%&output=embed' }} }, proto: { initIframe: function(){ mfp.types.push(IFRAME_NS); _mfpOn('BeforeChange', function(e, prevType, newType){ if(prevType!==newType){ if(prevType===IFRAME_NS){ _fixIframeBugs(); }else if(newType===IFRAME_NS){ _fixIframeBugs(true); }} }); _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function(){ _fixIframeBugs(); }); }, getIframe: function(item, template){ var embedSrc=item.src; var iframeSt=mfp.st.iframe; $.each(iframeSt.patterns, function(){ if(embedSrc.indexOf(this.index) > -1){ if(this.id){ if(typeof this.id==='string'){ embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); }else{ embedSrc=this.id.call(this, embedSrc); }} embedSrc=this.src.replace('%id%', embedSrc); return false; }}); var dataObj={}; if(iframeSt.srcAction){ dataObj[iframeSt.srcAction]=embedSrc; } mfp._parseMarkup(template, dataObj, item); mfp.updateStatus('ready'); return template; }} }); var _getLoopedId=function(index){ var numSlides=mfp.items.length; if(index > numSlides - 1){ return index - numSlides; }else if(index < 0){ return numSlides + index; } return index; }, _replaceCurrTotal=function(text, curr, total){ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); }; $.magnificPopup.registerModule('gallery', { options: { enabled: false, arrowMarkup: '', preload: [0,2], navigateByImgClick: true, arrows: true, tPrev: 'Previous (Left arrow key)', tNext: 'Next (Right arrow key)', tCounter: '%curr% of %total%' }, proto: { initGallery: function(){ var gSt=mfp.st.gallery, ns='.mfp-gallery'; mfp.direction=true; if(!gSt||!gSt.enabled) return false; _wrapClasses +=' mfp-gallery'; _mfpOn(OPEN_EVENT+ns, function(){ if(gSt.navigateByImgClick){ mfp.wrap.on('click'+ns, '.mfp-img', function(){ if(mfp.items.length > 1){ mfp.next(); return false; }}); } _document.on('keydown'+ns, function(e){ if(e.keyCode===37){ mfp.prev(); }else if(e.keyCode===39){ mfp.next(); }}); }); _mfpOn('UpdateStatus'+ns, function(e, data){ if(data.text){ data.text=_replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); }}); _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item){ var l=mfp.items.length; values.counter=l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l):''; }); _mfpOn('BuildControls' + ns, function(){ if(mfp.items.length > 1&&gSt.arrows&&!mfp.arrowLeft){ var markup=gSt.arrowMarkup, arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left')).addClass(PREVENT_CLOSE_CLASS), arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right')).addClass(PREVENT_CLOSE_CLASS); arrowLeft.click(function(){ mfp.prev(); }); arrowRight.click(function(){ mfp.next(); }); mfp.container.append(arrowLeft.add(arrowRight)); }}); _mfpOn(CHANGE_EVENT+ns, function(){ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); mfp._preloadTimeout=setTimeout(function(){ mfp.preloadNearbyImages(); mfp._preloadTimeout=null; }, 16); }); _mfpOn(CLOSE_EVENT+ns, function(){ _document.off(ns); mfp.wrap.off('click'+ns); mfp.arrowRight=mfp.arrowLeft=null; }); }, next: function(){ mfp.direction=true; mfp.index=_getLoopedId(mfp.index + 1); mfp.updateItemHTML(); }, prev: function(){ mfp.direction=false; mfp.index=_getLoopedId(mfp.index - 1); mfp.updateItemHTML(); }, goTo: function(newIndex){ mfp.direction=(newIndex >=mfp.index); mfp.index=newIndex; mfp.updateItemHTML(); }, preloadNearbyImages: function(){ var p=mfp.st.gallery.preload, preloadBefore=Math.min(p[0], mfp.items.length), preloadAfter=Math.min(p[1], mfp.items.length), i; for(i=1; i <=(mfp.direction ? preloadAfter:preloadBefore); i++){ mfp._preloadItem(mfp.index+i); } for(i=1; i <=(mfp.direction ? preloadBefore:preloadAfter); i++){ mfp._preloadItem(mfp.index-i); }}, _preloadItem: function(index){ index=_getLoopedId(index); if(mfp.items[index].preloaded){ return; } var item=mfp.items[index]; if(!item.parsed){ item=mfp.parseEl(index); } _mfpTrigger('LazyLoad', item); if(item.type==='image'){ item.img=$('').on('load.mfploader', function(){ item.hasSize=true; }).on('error.mfploader', function(){ item.hasSize=true; item.loadError=true; _mfpTrigger('LazyLoadError', item); }).attr('src', item.src); } item.preloaded=true; }} }); var RETINA_NS='retina'; $.magnificPopup.registerModule(RETINA_NS, { options: { replaceSrc: function(item){ return item.src.replace(/\.\w+$/, function(m){ return '@2x' + m; }); }, ratio: 1 }, proto: { initRetina: function(){ if(window.devicePixelRatio > 1){ var st=mfp.st.retina, ratio=st.ratio; ratio = !isNaN(ratio) ? ratio:ratio(); if(ratio > 1){ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item){ item.img.css({ 'max-width': item.img[0].naturalWidth / ratio, 'width': '100%' }); }); _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item){ item.src=st.replaceSrc(item, ratio); }); }} }} }); _checkInstance(); })); (function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass,null!=this.config.callback?this.config.callback(a):void 0},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); !function(e){e.fn.extend({tweecool:function(t){function a(e){var t=new Date,a=Date.parse(t),o=1e3*e,r=(a-o)/1e3,i=1,s=60,n=3600,l=86400,m=604800,u=2592e3,h=31536e3;return r>i&&s>r?Math.round(r/i)+" seconds ago":r>=s&&n>r?Math.round(r/s)+" minutes ago":r>=n&&l>r?Math.round(r/n)+" hours ago":r>=l&&m>r?Math.round(r/l)+" days ago":r>=m&&u>r?Math.round(r/m)+" weeks ago":r>=u&&h>r?Math.round(r/u)+" months ago":"over a year ago"}var o={username:"tweecool",limit:5,profile_image:!0,show_time:!0,show_media:!1,show_media_size:"small"},t=e.extend(o,t);return this.each(function(){var o=t,r=e(this),i=e('
        ').appendTo(r),s=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,n="";e.getJSON("https://www.api.tweecool.com/?screenname="+o.username+"&count="+o.limit,function(t){if(t.errors||null==t)return r.html("No tweets available."),!1;if(o.profile_image)var l=''+o.username+'';else l="";e.each(t.tweets,function(e,t){if(o.show_time)var r=a(t.timestamp);else var r="";n=o.show_media&&t.media_url?''+o.username+'':"",i.append('
      • '+l+'
        '+t.text.replace(s,'$1')+n+'
        '+r+"
      • ")})}).fail(function(e,t,a){r.html("No tweets available")})})}})}(jQuery); (function(n){var t;t=function(t,i){this.$el=n(t);this.end=i.expiryDate;this.interval=i.interval;this.speed=i.speed;this.timer=0;this.callBack=jQuery.isFunction(i.callBack)?i.callBack:null;this.localization={days:"days",hours:"hours",minutes:"minutes",seconds:"seconds"};n.extend(this.localization,this.localization,i.localization)};t.prototype={getCounterNumbers:function(){var n={days:{tens:0,units:0,hundreds:0},hours:{tens:0,units:0},minutes:{tens:0,units:0},seconds:{tens:0,units:0}},s=864e5,h=36e5,c=6e4,t=0,l=new Date,i=this.end.getTime()-l.getTime(),r,u,f,e,o;return i<=0?n:(r=Math.min(Math.floor(i/s),999),t=i%s,n.days.hundreds=Math.floor(r/100),u=r%100,n.days.tens=Math.floor(u/10),n.days.units=u%10,f=Math.floor(t/h),t=t%h,n.hours.tens=Math.floor(f/10),n.hours.units=f%10,e=Math.floor(t/c),t=t%c,n.minutes.tens=Math.floor(e/10),n.minutes.units=e%10,o=Math.floor(t/1e3),n.seconds.tens=Math.floor(o/10),n.seconds.units=o%10,n)},updatePart:function(t){var r=this.getCounterNumbers(),i=n("."+t,this.$el),u,f;t=="days"&&(this.setDayHundreds(r.days.hundreds>0),i.find(".number.hundreds.show").html()!=r[t].hundreds&&(u=n(".n1.hundreds",i),f=n(".n2.hundreds",i),this.scrollNumber(u,f,r[t].hundreds)));i.find(".number.tens.show").html()!=r[t].tens&&(u=n(".n1.tens",i),f=n(".n2.tens",i),this.scrollNumber(u,f,r[t].tens));i.find(".number.units.show").html()!=r[t].units&&(u=n(".n1.units",i),f=n(".n2.units",i),this.scrollNumber(u,f,r[t].units))},timeOut:function(){var n=new Date,t=this.end.getTime()-n.getTime();return t<=0?!0:!1},setDayHundreds:function(t){t?n(".counter.days",this.$el).addClass("with-hundreds"):n(".counter.days",this.$el).removeClass("with-hundreds")},updateCounter:function(){this.updatePart("days");this.updatePart("hours");this.updatePart("minutes");this.updatePart("seconds");this.timeOut()&&(this.stop(),this.callBack&&this.callBack(this))},localize:function(t){n.isPlainObject(t)&&n.extend(this.localization,this.localization,t);n(".days",this.$el).siblings(".counter-caption").text(this.localization.days);n(".hours",this.$el).siblings(".counter-caption").text(this.localization.hours);n(".minutes",this.$el).siblings(".counter-caption").text(this.localization.minutes);n(".seconds",this.$el).siblings(".counter-caption").text(this.localization.seconds)},start:function(){var n=this;n.stop();n.timer==0&&(n.timer=setInterval(function(){n.updateCounter()},n.interval));n.updateCounter()},stop:function(){this.timer>0&&(clearInterval(this.timer),this.timer=0)},scrollNumber:function(n,t,i){n.hasClass("show")?(t.removeClass("hidden-down").css("top","-100%").text(i).stop().animate({top:0},this.speed,function(){t.addClass("show")}),n.stop().animate({top:"100%"},this.speed,function(){n.removeClass("show").addClass("hidden-down")})):(n.removeClass("hidden-down").css("top","-100%").text(i).stop().animate({top:0},this.speed,function(){n.addClass("show")}),t.stop().animate({top:"100%"},this.speed,function(){t.removeClass("show").addClass("hidden-down")}))}};jQuery.fn.mbComingsoon=function(i){var u={interval:1e3,callBack:null,localization:{days:"days",hours:"hours",minutes:"minutes",seconds:"seconds"},speed:500},r={},f='
        0<\/div>
        0<\/div>
        0<\/div>
        0<\/div>
        0<\/div>
        0<\/div> <\/div>
        days<\/div> <\/div>
        0<\/div>
        0<\/div>
        0<\/div>
        0<\/div> <\/div>
        hours<\/div> <\/div>
        0<\/div>
        0<\/div>
        0<\/div>
        0<\/div> <\/div>
        minutes<\/div> <\/div>
        0<\/div>
        0<\/div>
        0<\/div>
        0<\/div> <\/div>
        seconds<\/div> <\/div> <\/div>';return this.each(function(){var o=n(this),e=o.data("mbComingsoon");if(typeof e=="undefined"){if(i instanceof Date?r.expiryDate=i:n.isPlainObject(i)?n.extend(r,u,i):typeof i=="string"&&(r.expiryDate=new Date(i)),!r.expiryDate)throw new Error("Expiry date is required!");e=new t(o,r);o.data("mbComingsoon",e);o.html(f);e.localize();e.start()}else i=="start"?e.start():i=="stop"?e.stop():n.isPlainObject(i)&&(i.expiryDate instanceof Date&&(e.end=i.expiryDate),n.isNumeric(i.interval)&&(e.interval=i.interval),n.isFunction(i.callBack)&&(e.callBack=i.callBack),n.isPlainObject(i.localization)&&this.localize(i.localization),e.start())})}})(jQuery); !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipe=b()}(this,function(){"use strict";var a=function(a,b,c,d){var e={features:null,bind:function(a,b,c,d){var e=(d?"remove":"add")+"EventListener";b=b.split(" ");for(var f=0;f0&&(g=parseInt(g[1],10),g>=1&&8>g&&(d.isOldIOSPhone=!0))}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(4.4>i&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;4>n;n++){c=m[n];for(var o=0;3>o;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;hb-1?a-b:0>a?b+a:a},zb={},Ab=function(a,b){return zb[a]||(zb[a]=[]),zb[a].push(b)},Bb=function(a){var b=zb[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;dc&&d>0||c>=$c()-1&&0>d)&&(a=rc.x+d*i.mainScrollEndFriction)}rc.x=a,Hb(a,n)},Jb=function(a,b){var c=sc[a]-y[a];return ob[a]+nb[a]+c-c*(b/t)},Kb=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Lb=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},Mb=null,Nb=function(){Mb&&(e.unbind(document,"mousemove",Nb),e.addClass(a,"pswp--has_mouse"),i.mouseUsed=!0,Bb("mouseUsed")),Mb=setTimeout(function(){Mb=null},100)},Ob=function(){e.bind(document,"keydown",f),O.transform&&e.bind(f.scrollWrap,"click",f),i.mouseUsed||e.bind(document,"mousemove",Nb),e.bind(window,"resize scroll",f),Bb("bindEvents")},Pb=function(){e.unbind(window,"resize",f),e.unbind(window,"scroll",r.scroll),e.unbind(document,"keydown",f),e.unbind(document,"mousemove",Nb),O.transform&&e.unbind(f.scrollWrap,"click",f),V&&e.unbind(window,p,f),Bb("unbindEvents")},Qb=function(a,b){var c=gd(f.currItem,qb,a);return b&&(db=c),c},Rb=function(a){return a||(a=f.currItem),a.initialZoomLevel},Sb=function(a){return a||(a=f.currItem),a.w>0?i.maxSpreadZoom:1},Tb=function(a,b,c,d){return d===f.currItem.initialZoomLevel?(c[a]=f.currItem.initialPosition[a],!0):(c[a]=Jb(a,d),c[a]>b.min[a]?(c[a]=b.min[a],!0):c[a]=d)return $b(a),f(c),void(g&&g());f((c-b)*e(h/d)+b),Yb[a].raf=I(j)}};j()},cc={shout:Bb,listen:Ab,viewportSize:qb,options:i,isMainScrollAnimating:function(){return fb},getZoomLevel:function(){return s},getCurrentIndex:function(){return m},isDragging:function(){return V},isZooming:function(){return ab},setScrollOffset:function(a,b){y.x=a,N=y.y=b},applyZoomPan:function(a,b,c){pb.x=b,pb.y=c,s=a,Fb()},init:function(){if(!j&&!k){var c;f.framework=e,f.template=a,f.bg=e.getChildByClass(a,"pswp__bg"),K=a.className,j=!0,O=e.detectFeatures(),I=O.raf,J=O.caf,F=O.transform,M=O.oldIE,f.scrollWrap=e.getChildByClass(a,"pswp__scroll-wrap"),f.container=e.getChildByClass(f.scrollWrap,"pswp__container"),n=f.container.style,f.itemHolders=z=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],z[0].el.style.display=z[2].el.style.display="none",Ub(),r={resize:f.updateSize,scroll:Xb,keydown:Vb,click:Wb};var d=O.isOldIOSPhone||O.isOldAndroid||O.isMobileOpera;for(O.animationName&&O.transform&&!d||(i.showAnimationDuration=i.hideAnimationDuration=0),c=0;cm||m>=$c())&&(m=0),f.currItem=Zc(m),(O.isOldIOSPhone||O.isOldAndroid)&&(ub=!1),i.modal&&(a.setAttribute("aria-hidden","false"),ub?a.style.position="fixed":(a.style.position="absolute",a.style.top=e.getScrollY()+"px")),void 0===N&&(Bb("initialLayout"),N=L=e.getScrollY());var l="pswp--open ";for(i.mainClass&&(l+=i.mainClass+" "),i.showHideOpacity&&(l+="pswp--animate_opacity "),l+=H?"pswp--touch":"pswp--notouch",l+=O.animationName?" pswp--css_animation":"",l+=O.svg?" pswp--svg":"",e.addClass(a,l),f.updateSize(),o=-1,tb=null,c=0;h>c;c++)Hb((c+o)*sb.x,z[c].el.style);M||e.bind(f.scrollWrap,q,f),Ab("initialZoomInEnd",function(){f.setContent(z[0],m-1),f.setContent(z[2],m+1),z[0].el.style.display=z[2].el.style.display="block",i.focus&&a.focus(),Ob()}),f.setContent(z[1],m),f.updateCurrItem(),Bb("afterInit"),ub||(w=setInterval(function(){Zb||V||ab||s!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),e.addClass(a,"pswp--visible")}},close:function(){j&&(j=!1,k=!0,Bb("close"),Pb(),ad(f.currItem,null,!0,f.destroy))},destroy:function(){Bb("destroy"),Vc&&clearTimeout(Vc),i.modal&&(a.setAttribute("aria-hidden","true"),a.className=K),w&&clearInterval(w),e.unbind(f.scrollWrap,q,f),e.unbind(window,"scroll",f),xc(),ac(),zb=null},panTo:function(a,b,c){c||(a>db.min.x?a=db.min.x:adb.min.y?b=db.min.y:ba;a++)z[a].item&&(z[a].item.needsUpdate=!0)},updateCurrItem:function(a){if(0!==tb){var b,c=Math.abs(tb);if(!(a&&2>c)){f.currItem=Zc(m),Bb("beforeChange",tb),c>=h&&(o+=tb+(tb>0?-h:h),c=h);for(var d=0;c>d;d++)tb>0?(b=z.shift(),z[h-1]=b,o++,Hb((o+2)*sb.x,b.el.style),f.setContent(b,m-c+d+1+1)):(b=z.pop(),z.unshift(b),o--,Hb(o*sb.x,b.el.style),f.setContent(b,m+c-d-1-1));if(eb&&1===Math.abs(tb)){var e=Zc(A);e.initialZoomLevel!==s&&(gd(e,qb),Gb(e))}tb=0,f.updateCurrZoomItem(),A=m,Bb("afterChange")}}},updateSize:function(b){if(!ub){var c=e.getScrollY();if(N!==c&&(a.style.top=c+"px",N=c),!b&&wb.x===window.innerWidth&&wb.y===window.innerHeight)return;wb.x=window.innerWidth,wb.y=window.innerHeight,a.style.height=wb.y+"px"}if(qb.x=f.scrollWrap.clientWidth,qb.y=f.scrollWrap.clientHeight,y={x:0,y:N},sb.x=qb.x+Math.round(qb.x*i.spacing),sb.y=qb.y,Ib(sb.x*rb),Bb("beforeResize"),void 0!==o){for(var d,g,j,k=0;h>k;k++)d=z[k],Hb((k+o)*sb.x,d.el.style),j=m+k-1,i.loop&&$c()>2&&(j=yb(j)),g=Zc(j),g&&(x||g.needsUpdate||!g.bounds)?(f.cleanSlide(g),f.setContent(d,j),1===k&&(f.currItem=g,f.updateCurrZoomItem(!0)),g.needsUpdate=!1):-1===d.index&&j>=0&&f.setContent(d,j),g&&g.container&&(gd(g,qb),Gb(g));x=!1}t=s=f.currItem.initialZoomLevel,db=f.currItem.bounds,db&&(pb.x=db.center.x,pb.y=db.center.y,Fb()),Bb("resize")},zoomTo:function(a,b,c,d,f){b&&(t=s,sc.x=Math.abs(b.x)-pb.x,sc.y=Math.abs(b.y)-pb.y,Kb(ob,pb));var g=Qb(a,!1),h={};Tb("x",g,h,a),Tb("y",g,h,a);var i=s,j={x:pb.x,y:pb.y};Lb(h);var k=function(b){1===b?(s=a,pb.x=h.x,pb.y=h.y):(s=(a-i)*b+i,pb.x=(h.x-j.x)*b+j.x,pb.y=(h.y-j.y)*b+j.y),f&&f(b),Fb()};c?bc("customZoomTo",0,1,c,d||e.easing.sine.inOut,k):k(1)}},dc=30,ec=10,fc={},gc={},hc={},ic={},jc={},kc=[],lc={},mc=[],nc={},oc=0,pc=mb(),qc=0,rc=mb(),sc=mb(),tc=mb(),uc=function(a,b){return a.x===b.x&&a.y===b.y},vc=function(a,b){return Math.abs(a.x-b.x)-1?!1:b(a)?a:Ac(a.parentNode,b):!1},Bc={},Cc=function(a,b){return Bc.prevent=!Ac(a.target,i.isClickableElement),Bb("preventDragEvent",a,b,Bc),Bc.prevent},Dc=function(a,b){return b.x=a.pageX,b.y=a.pageY,b.id=a.identifier,b},Ec=function(a,b,c){c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y)},Fc=function(a,b,c){if(a-Q>50){var d=mc.length>2?mc.shift():{};d.x=b,d.y=c,mc.push(d),Q=a}},Gc=function(){var a=pb.y-f.currItem.initialPosition.y;return 1-Math.abs(a/(qb.y/2))},Hc={},Ic={},Jc=[],Kc=function(a){for(;Jc.length>0;)Jc.pop();return G?(lb=0,kc.forEach(function(a){0===lb?Jc[0]=a:1===lb&&(Jc[1]=a),lb++})):a.type.indexOf("touch")>-1?a.touches&&a.touches.length>0&&(Jc[0]=Dc(a.touches[0],Hc),a.touches.length>1&&(Jc[1]=Dc(a.touches[1],Ic))):(Hc.x=a.pageX,Hc.y=a.pageY,Hc.id="",Jc[0]=Hc),Jc},Lc=function(a,b){var c,d,e,g,h=0,j=pb[a]+b[a],k=b[a]>0,l=rc.x+b.x,m=rc.x-lc.x;return c=j>db.min[a]||jdb.min[a]&&(c=i.panEndFriction,h=db.min[a]-j,d=db.min[a]-ob[a]),(0>=d||0>m)&&$c()>1?(g=l,0>m&&l>lc.x&&(g=lc.x)):db.min.x!==db.max.x&&(e=j)):(j=d||m>0)&&$c()>1?(g=l,m>0&&lf.currItem.fitRatio&&(pb[a]+=b[a]*c)):(void 0!==g&&(Ib(g,!0),$=g===lc.x?!1:!0),db.min.x!==db.max.x&&(void 0!==e?pb.x=e:$||(pb.x+=b.x*c)),void 0!==g)},Mc=function(a){if(!("mousedown"===a.type&&a.button>0)){if(Yc)return void a.preventDefault();if(!U||"mousedown"!==a.type){if(Cc(a,!0)&&a.preventDefault(),Bb("pointerDown"),G){var b=e.arraySearch(kc,a.pointerId,"id");0>b&&(b=kc.length),kc[b]={x:a.pageX,y:a.pageY,id:a.pointerId}}var c=Kc(a),d=c.length;_=null,ac(),V&&1!==d||(V=hb=!0,e.bind(window,p,f),S=kb=ib=T=$=Y=W=X=!1,gb=null,Bb("firstTouchStart",c),Kb(ob,pb),nb.x=nb.y=0,Kb(ic,c[0]),Kb(jc,ic),lc.x=sb.x*rb,mc=[{x:ic.x,y:ic.y}],Q=P=Cb(),Qb(s,!0),xc(),yc()),!ab&&d>1&&!fb&&!$&&(t=s,X=!1,ab=W=!0,nb.y=nb.x=0,Kb(ob,pb),Kb(fc,c[0]),Kb(gc,c[1]),Ec(fc,gc,tc),sc.x=Math.abs(tc.x)-pb.x,sc.y=Math.abs(tc.y)-pb.y,bb=cb=wc(fc,gc))}}},Nc=function(a){if(a.preventDefault(),G){var b=e.arraySearch(kc,a.pointerId,"id");if(b>-1){var c=kc[b];c.x=a.pageX,c.y=a.pageY}}if(V){var d=Kc(a);if(gb||Y||ab)_=d;else{var f=Math.abs(d[0].x-ic.x)-Math.abs(d[0].y-ic.y);Math.abs(f)>=ec&&(gb=f>0?"h":"v",_=d)}}},Oc=function(){if(_){var a=_.length;if(0!==a)if(Kb(fc,_[0]),hc.x=fc.x-ic.x,hc.y=fc.y-ic.y,ab&&a>1){if(ic.x=fc.x,ic.y=fc.y,!hc.x&&!hc.y&&uc(_[1],gc))return;Kb(gc,_[1]),X||(X=!0,Bb("zoomGestureStarted"));var b=wc(fc,gc),c=Tc(b);c>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(kb=!0);var d=1,e=Rb(),g=Sb();if(e>c)if(i.pinchToClose&&!kb&&t<=f.currItem.initialZoomLevel){var h=e-c,j=1-h/(e/1.2);Db(j),Bb("onPinchClose",j),ib=!0}else d=(e-c)/e,d>1&&(d=1),c=e-d*(e/3);else c>g&&(d=(c-g)/(6*e),d>1&&(d=1),c=g+d*e);0>d&&(d=0),bb=b,Ec(fc,gc,pc),nb.x+=pc.x-tc.x,nb.y+=pc.y-tc.y,Kb(tc,pc),pb.x=Jb("x",c),pb.y=Jb("y",c),S=c>s,s=c,Fb()}else{if(!gb)return;if(hb&&(hb=!1,Math.abs(hc.x)>=ec&&(hc.x-=_[0].x-jc.x),Math.abs(hc.y)>=ec&&(hc.y-=_[0].y-jc.y)),ic.x=fc.x,ic.y=fc.y,0===hc.x&&0===hc.y)return;if("v"===gb&&i.closeOnVerticalDrag&&!zc()){nb.y+=hc.y,pb.y+=hc.y;var k=Gc();return T=!0,Bb("onVerticalDrag",k),Db(k),void Fb()}Fc(Cb(),fc.x,fc.y),Y=!0,db=f.currItem.bounds;var l=Lc("x",hc);l||(Lc("y",hc),Lb(pb),Fb())}}},Pc=function(a){if(O.isOldAndroid){if(U&&"mouseup"===a.type)return;a.type.indexOf("touch")>-1&&(clearTimeout(U),U=setTimeout(function(){U=0},600))}Bb("pointerUp"),Cc(a,!1)&&a.preventDefault();var b;if(G){var c=e.arraySearch(kc,a.pointerId,"id");if(c>-1)if(b=kc.splice(c,1)[0],navigator.pointerEnabled)b.type=a.pointerType||"mouse";else{var d={4:"mouse",2:"touch",3:"pen"};b.type=d[a.pointerType],b.type||(b.type=a.pointerType||"mouse")}}var g,h=Kc(a),i=h.length;if("mouseup"===a.type&&(i=0),2===i)return _=null,!0;1===i&&Kb(jc,h[0]),0!==i||gb||fb||(b||("mouseup"===a.type?b={x:a.pageX,y:a.pageY,type:"mouse"}:a.changedTouches&&a.changedTouches[0]&&(b={x:a.changedTouches[0].pageX,y:a.changedTouches[0].pageY,type:"touch"})),Bb("touchRelease",a,b));var j=-1;if(0===i&&(V=!1,e.unbind(window,p,f),xc(),ab?j=0:-1!==qc&&(j=Cb()-qc)),qc=1===i?Cb():-1,g=-1!==j&&150>j?"zoom":"swipe",ab&&2>i&&(ab=!1,1===i&&(g="zoomPointerUp"),Bb("zoomGestureEnded")),_=null,Y||X||fb||T)if(ac(),R||(R=Qc()),R.calculateSwipeSpeed("x"),T){var k=Gc();if(.6>k)f.close();else{var l=pb.y,m=jb;bc("verticalDrag",0,1,300,e.easing.cubic.out,function(a){pb.y=(f.currItem.initialPosition.y-l)*a+l,Db((1-m)*a+m),Fb()}),Bb("onVerticalDrag",1)}}else{if(($||fb)&&0===i){var n=Sc(g,R);if(n)return;g="zoomPointerUp"}if(!fb)return"swipe"!==g?void Uc():void(!$&&s>f.currItem.fitRatio&&Rc(R))}},Qc=function(){var a,b,c={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(d){mc.length>1?(a=Cb()-Q+50,b=mc[mc.length-2][d]):(a=Cb()-P,b=jc[d]),c.lastFlickOffset[d]=ic[d]-b,c.lastFlickDist[d]=Math.abs(c.lastFlickOffset[d]),c.lastFlickSpeed[d]=c.lastFlickDist[d]>20?c.lastFlickOffset[d]/a:0,Math.abs(c.lastFlickSpeed[d])<.1&&(c.lastFlickSpeed[d]=0),c.slowDownRatio[d]=.95,c.slowDownRatioReverse[d]=1-c.slowDownRatio[d],c.speedDecelerationRatio[d]=1},calculateOverBoundsAnimOffset:function(a,b){c.backAnimStarted[a]||(pb[a]>db.min[a]?c.backAnimDestination[a]=db.min[a]:pb[a]dc&&(h||b.lastFlickOffset.x>20)?d=-1:-dc>g&&(h||b.lastFlickOffset.x<-20)&&(d=1)}var j;d&&(m+=d,0>m?(m=i.loop?$c()-1:0,j=!0):m>=$c()&&(m=i.loop?0:$c()-1,j=!0),(!j||i.loop)&&(tb+=d,rb-=d,c=!0));var k,l=sb.x*rb,n=Math.abs(l-rc.x);return c||l>rc.x==b.lastFlickSpeed.x>0?(k=Math.abs(b.lastFlickSpeed.x)>0?n/Math.abs(b.lastFlickSpeed.x):333,k=Math.min(k,400),k=Math.max(k,250)):k=333,oc===m&&(c=!1),fb=!0,Bb("mainScrollAnimStart"),bc("mainScroll",rc.x,l,k,e.easing.cubic.out,Ib,function(){ac(),fb=!1,oc=-1,(c||oc!==m)&&f.updateCurrItem(),Bb("mainScrollAnimComplete")}),c&&f.updateCurrItem(!0),c},Tc=function(a){return 1/cb*a*t},Uc=function(){var a=s,b=Rb(),c=Sb();b>s?a=b:s>c&&(a=c);var d,g=1,h=jb;return ib&&!S&&!kb&&b>s?(f.close(),!0):(ib&&(d=function(a){Db((g-h)*a+h)}),f.zoomTo(a,0,300,e.easing.cubic.out,d),!0)};xb("Gestures",{publicMethods:{initGestures:function(){var a=function(a,b,c,d,e){B=a+b,C=a+c,D=a+d,E=e?a+e:""};G=O.pointerEvent,G&&O.touch&&(O.touch=!1),G?navigator.pointerEnabled?a("pointer","down","move","up","cancel"):a("MSPointer","Down","Move","Up","Cancel"):O.touch?(a("touch","start","move","end","cancel"),H=!0):a("mouse","down","move","up"),p=C+" "+D+" "+E,q=B,G&&!H&&(H=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),f.likelyTouchDevice=H,r[B]=Mc,r[C]=Nc,r[D]=Pc,E&&(r[E]=r[D]),O.touch&&(q+=" mousedown",p+=" mousemove mouseup",r.mousedown=r[B],r.mousemove=r[C],r.mouseup=r[D]),H||(i.allowPanToNext=!1)}}});var Vc,Wc,Xc,Yc,Zc,$c,_c,ad=function(b,c,d,g){Vc&&clearTimeout(Vc),Yc=!0,Xc=!0;var h;b.initialLayout?(h=b.initialLayout,b.initialLayout=null):h=i.getThumbBoundsFn&&i.getThumbBoundsFn(m);var j=d?i.hideAnimationDuration:i.showAnimationDuration,k=function(){$b("initialZoom"),d?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(Db(1),c&&(c.style.display="block"),e.addClass(a,"pswp--animated-in"),Bb("initialZoom"+(d?"OutEnd":"InEnd"))),g&&g(),Yc=!1};if(!j||!h||void 0===h.x){var n=function(){Bb("initialZoom"+(d?"Out":"In")),s=b.initialZoomLevel,Kb(pb,b.initialPosition),Fb(),a.style.opacity=d?0:1,Db(1),k()};return void n()}var o=function(){var c=l,g=!f.currItem.src||f.currItem.loadError||i.showHideOpacity;b.miniImg&&(b.miniImg.style.webkitBackfaceVisibility="hidden"),d||(s=h.w/b.w,pb.x=h.x,pb.y=h.y-L,f[g?"template":"bg"].style.opacity=.001,Fb()),_b("initialZoom"),d&&!c&&e.removeClass(a,"pswp--animated-in"),g&&(d?e[(c?"remove":"add")+"Class"](a,"pswp--animate_opacity"):setTimeout(function(){e.addClass(a,"pswp--animate_opacity")},30)),Vc=setTimeout(function(){if(Bb("initialZoom"+(d?"Out":"In")),d){var f=h.w/b.w,i={x:pb.x,y:pb.y},l=s,m=jb,n=function(b){1===b?(s=f,pb.x=h.x,pb.y=h.y-N):(s=(f-l)*b+l,pb.x=(h.x-i.x)*b+i.x,pb.y=(h.y-N-i.y)*b+i.y),Fb(),g?a.style.opacity=1-b:Db(m-b*m)};c?bc("initialZoom",0,1,j,e.easing.cubic.out,n,k):(n(1),Vc=setTimeout(k,j+20))}else s=b.initialZoomLevel,Kb(pb,b.initialPosition),Fb(),Db(1),g?a.style.opacity=1:Db(1),Vc=setTimeout(k,j+20)},d?25:90)};o()},bd={},cd=[],dd={index:0,errorMsg:'
        The image could not be loaded.
        ',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Wc.length}},ed=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},fd=function(a,b,c){var d=a.bounds;d.center.x=Math.round((bd.x-b)/2),d.center.y=Math.round((bd.y-c)/2)+a.vGap.top,d.max.x=b>bd.x?Math.round(bd.x-b):d.center.x,d.max.y=c>bd.y?Math.round(bd.y-c)+a.vGap.top:d.center.y,d.min.x=b>bd.x?0:d.center.x,d.min.y=c>bd.y?a.vGap.top:d.center.y},gd=function(a,b,c){if(a.src&&!a.loadError){var d=!c;if(d&&(a.vGap||(a.vGap={top:0,bottom:0}),Bb("parseVerticalMargin",a)),bd.x=b.x,bd.y=b.y-a.vGap.top-a.vGap.bottom,d){var e=bd.x/a.w,f=bd.y/a.h;a.fitRatio=f>e?e:f;var g=i.scaleMode;"orig"===g?c=1:"fit"===g&&(c=a.fitRatio),c>1&&(c=1),a.initialZoomLevel=c,a.bounds||(a.bounds=ed())}if(!c)return;return fd(a,a.w*c,a.h*c),d&&c===a.initialZoomLevel&&(a.initialPosition=a.bounds.center),a.bounds}return a.w=a.h=0,a.initialZoomLevel=a.fitRatio=1,a.bounds=ed(),a.initialPosition=a.bounds.center,a.bounds},hd=function(a,b,c,d,e,g){if(!b.loadError){var h,j=f.isDragging()&&!f.isZooming(),k=a===m||f.isMainScrollAnimating()||j;!e&&(H||i.alwaysFadeIn)&&k&&(h=!0),d&&(h&&(d.style.opacity=0),b.imageAppended=!0,c.appendChild(d),h&&setTimeout(function(){d.style.opacity=1,g&&setTimeout(function(){b&&b.loaded&&b.placeholder&&(b.placeholder.style.display="none",b.placeholder=null)},500)},50))}},id=function(a){a.loading=!0,a.loaded=!1;var b=a.img=e.createEl("pswp__img","img"),c=function(){a.loading=!1,a.loaded=!0,a.loadComplete?a.loadComplete(a):a.img=null,b.onload=b.onerror=null,b=null};return b.onload=c,b.onerror=function(){a.loadError=!0,c()},b.src=a.src,b},jd=function(a,b){return a.src&&a.loadError&&a.container?(b&&(a.container.innerHTML=""),a.container.innerHTML=i.errorMsg.replace("%url%",a.src),!0):void 0},kd=function(){if(cd.length){for(var a,b=0;b0,e=Math.min(c[0],$c()),g=Math.min(c[1],$c());for(b=1;(d?g:e)>=b;b++)f.lazyLoadItem(m+b);for(b=1;(d?e:g)>=b;b++)f.lazyLoadItem(m-b)}),Ab("initialLayout",function(){f.currItem.initialLayout=i.getThumbBoundsFn&&i.getThumbBoundsFn(m)}),Ab("mainScrollAnimComplete",kd),Ab("initialZoomInEnd",kd),Ab("destroy",function(){for(var a,b=0;b=0&&void 0!==Wc[a]?Wc[a]:!1},allowProgressiveImg:function(){return i.forceProgressiveLoading||!H||i.mouseUsed||screen.width>1200},setContent:function(a,b){i.loop&&(b=yb(b));var c=f.getItemAt(a.index);c&&(c.container=null);var d,g=f.getItemAt(b);if(!g)return void(a.el.innerHTML="");Bb("gettingData",b,g),a.index=b,a.item=g;var h=g.container=e.createEl("pswp__zoom-wrap");if(!g.src&&g.html&&(g.html.tagName?h.appendChild(g.html):h.innerHTML=g.html),jd(g),!g.src||g.loadError||g.loaded)g.src&&!g.loadError&&(d=e.createEl("pswp__img","img"),d.style.webkitBackfaceVisibility="hidden",d.style.opacity=1,d.src=g.src,hd(b,g,h,d,!0));else{if(g.loadComplete=function(c){if(j){if(c.img&&(c.img.style.webkitBackfaceVisibility="hidden"),a&&a.index===b){if(jd(c,!0))return c.loadComplete=c.img=null,gd(c,qb),Gb(c),void(a.index===m&&f.updateCurrZoomItem());c.imageAppended?!Yc&&c.placeholder&&(c.placeholder.style.display="none",c.placeholder=null):O.transform&&(fb||Yc)?cd.push({item:c,baseDiv:h,img:c.img,index:b,holder:a}):hd(b,c,h,c.img,fb||Yc)}c.loadComplete=null,c.img=null,Bb("imageLoadComplete",b,c)}},e.features.transform){var k="pswp__img pswp__img--placeholder";k+=g.msrc?"":" pswp__img--placeholder--blank";var l=e.createEl(k,g.msrc?"img":"");g.msrc&&(l.src=g.msrc),l.style.width=g.w+"px",l.style.height=g.h+"px",h.appendChild(l),g.placeholder=l}g.loading||id(g),f.allowProgressiveImg()&&(!Xc&&O.transform?cd.push({item:g,baseDiv:h,img:g.img,index:b,holder:a}):hd(b,g,h,g.img,!0,!0))}gd(g,qb),Xc||b!==m?Gb(g):(eb=h.style,ad(g,d||g.img)),a.el.innerHTML="",a.el.appendChild(h)},cleanSlide:function(a){a.img&&(a.img.onload=a.img.onerror=null),a.loaded=a.loading=a.img=a.imageAppended=!1}}});var ld,md={},nd=function(a,b,c){var d=document.createEvent("CustomEvent"),e={origEvent:a,target:a.target,releasePoint:b,pointerType:c||"touch"};d.initCustomEvent("pswpTap",!0,!0,e),a.target.dispatchEvent(d)};xb("Tap",{publicMethods:{initTap:function(){Ab("firstTouchStart",f.onTapStart),Ab("touchRelease",f.onTapRelease),Ab("destroy",function(){md={},ld=null})},onTapStart:function(a){a.length>1&&(clearTimeout(ld),ld=null)},onTapRelease:function(a,b){if(b&&!Y&&!W&&!Zb){var c=b;if(ld&&(clearTimeout(ld),ld=null,vc(c,md)))return void Bb("doubleTap",c);if("mouse"===b.type)return void nd(a,b,"mouse");var d=a.target.tagName.toUpperCase();if("BUTTON"===d||e.hasClass(a.target,"pswp__single-tap"))return void nd(a,b);Kb(md,c),ld=setTimeout(function(){nd(a,b),ld=null},300)}}}});var od;xb("DesktopZoom",{publicMethods:{initDesktopZoom:function(){M||(H?Ab("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(b){od={};var c="wheel mousewheel DOMMouseScroll";Ab("bindEvents",function(){e.bind(a,c,f.handleMouseWheel)}),Ab("unbindEvents",function(){od&&e.unbind(a,c,f.handleMouseWheel)}),f.mouseZoomedIn=!1;var d,g=function(){f.mouseZoomedIn&&(e.removeClass(a,"pswp--zoomed-in"),f.mouseZoomedIn=!1),1>s?e.addClass(a,"pswp--zoom-allowed"):e.removeClass(a,"pswp--zoom-allowed"),h()},h=function(){d&&(e.removeClass(a,"pswp--dragging"),d=!1)};Ab("resize",g),Ab("afterChange",g),Ab("pointerDown",function(){f.mouseZoomedIn&&(d=!0,e.addClass(a,"pswp--dragging"))}),Ab("pointerUp",h),b||g()},handleMouseWheel:function(a){if(s<=f.currItem.fitRatio)return i.closeOnScroll?F&&Math.abs(a.deltaY)>2&&(l=!0,f.close()):a.preventDefault(),!0;if(a.preventDefault(),a.stopPropagation(),od.x=0,"deltaX"in a)od.x=a.deltaX,od.y=a.deltaY;else if("wheelDelta"in a)a.wheelDeltaX&&(od.x=-.16*a.wheelDeltaX),od.y=a.wheelDeltaY?-.16*a.wheelDeltaY:-.16*a.wheelDelta;else{if(!("detail"in a))return;od.y=a.detail}Qb(s,!0),f.panTo(pb.x-od.x,pb.y-od.y)},toggleDesktopZoom:function(b){b=b||{x:qb.x/2,y:qb.y/2+N};var c=i.getDoubleTapZoom(!0,f.currItem),d=s===c;f.mouseZoomedIn=!d,f.zoomTo(d?f.currItem.initialZoomLevel:c,b,333),e[(d?"remove":"add")+"Class"](a,"pswp--zoomed-in")}}});var pd,qd,rd,sd,td,ud,vd,wd,xd,yd,zd,Ad,Bd={history:!0,galleryUID:1},Cd=function(){return zd.hash.substring(1)},Dd=function(){pd&&clearTimeout(pd),rd&&clearTimeout(rd)},Ed=function(){var a=Cd(),b={};if(a.length<5)return b;for(var c=a.split("&"),d=0;d-1&&(vd=vd.substring(0,b),"&"===vd.slice(-1)&&(vd=vd.slice(0,-1))),setTimeout(function(){j&&e.bind(window,"hashchange",f.onHashChange)},40)}},onHashChange:function(){return Cd()===vd?(xd=!0,void f.close()):void(sd||(td=!0,f.goTo(Ed().pid),td=!1))},updateURL:function(){Dd(),td||(wd?pd=setTimeout(Fd,800):Fd())}}}),e.extend(f,cc)};return a}); !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / "},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.className,g=0;g-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>1200},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),c.href?c.hasAttribute("download")?!0:(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1):!1},H=function(){for(var a,b,c,d,e,f="",g=0;g